Samsung OA internship questions
Anonymous User
1300

There was 3 question in the assessment and the time was 70 minutes ,
1st one is a two pointer based (LC easy).

2nd one is tree based : the question is to find the count the number of subtrees that have the digit sum of all individual nodes are equal to k.
Input :
k = 3
-------------------12
---------------30 ----25
output : 2 -> 1st subtree is 12 and 30 and 2nd one is 30 as the digit sum value of each nodes is 3.

3rd one is also tree based : the question is to find the right view of tree and output should be in the form of flatten tree without using extra space (this was the tricky part of this question).

-> hope you will upvote :) .

Comments (2)