For a given a Binary Tree of integers, replace each of its data with the depth of the tree. Root is at depth 0, hence the root data is updated with 0. Replicate the same further going down the in the ...
For a given input string(str), find and return the total number of words present in it. It is assumed that two words will have only a single space in between. Also, there wouldn't be any leading and ...