>>> def count_partitions(n, m):
"""Count the ways to partition n using parts up to m."""
if n == 0:
return 1
elif n < 0:
return 0
elif m == 0:
return 0
else:
return count_partitions(n-m, m) + count_partitions(n, m-1)
// search for target in a tree using recursive function
const treeIncludes = (target , root )=>{
if(root===null)return false;
if(root.data===target) return true ;
return treeIncludes(target , root.left ) || treeIncludes(target , root.right );
}