Listing Specific Categories from Current Post with Depth

This takes all the categories associated with your post and checks if they are parents of anything else. If one is not, it is the lowest category and is echoed out.

<?php
    $postCats = wp_get_post_categories(); 
    foreach($postCats as $childcat) { 

        //this is a top level category

        if ($childcat->category_parent==0) {
            continue;
        }

        for ($J=0;$J<sizeof($postCats);$J++) {

            //if another category lists it as its parent, it cannot be the lowest category 
            if (strcmp($childcat->name,$postCats->category_parent)==0)
                break;
        }

        //at this point, no other cateogry says it's its parent, therefore it must be the lowest one

        echo '<li> <a href="'.get_category_link($childcat->cat_ID).'">'; 
        echo $childcat->cat_name . '</a> </li>'; 
    } 

?>