Task 1: "Represent Integer You are given a positive integer $N and a digit $D. Write a script to check if $N can be represented as a sum of positive integers having $D at least once. If check passes print 1 otherwise 0. Example Input: $N = 25, $D = 7 Output: 0 as there are 2 numbers between 1 and 25 having the digit 7 i.e. 7 and 17. If we add up both we don't get 25. Input: $N = 24, $D = 7 Output: 1 " My notes: sounds very simple. sum ( grep contains 7 ) Task 2: "Recreate Binary Tree You are given a Binary Tree. Write a script to replace each node of the tree with the sum of all the remaining nodes. Example Input Binary Tree 1 / \ 2 3 / / \ 4 5 6 \ 7 Output Binary Tree 27 / \ 26 25 / / \ 24 23 22 \ 21 " My notes: so each node's value becomes sum(allnodes) - that node's value Very tempting to view this as an ascii art -> ascii art problem, last time we did a similar tree question, I spent a lot of time building the tree structure, and getting nice layout from print_tree..