deepshikhaagrl
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Find height of each node to be found from the root. If height is same of both the nodes then return true.
- deepshikhaagrl March 17, 2016Comment hidden because of low score. Click to expand.
0
of 0 vote
Assuming all numbers in the set are positive.
Step 1. Add the numbers in the set.
Step 2. Subtract the given sum from added total at step1.
Step 3. Divide number by 2 at step 2. Reverse the sign of this particular number.
Comment hidden because of low score. Click to expand.
0
of 0 vote
dcbdcbx -> dcbx (Why x is not the answer here)
dcbdcbax -> x
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Class B object can't be created because its destructor is private. When you compile code, compiler adds constructor/destructor implicitly for local objects(objects on stack). However, since destructor is private, it won't be found and hence compilation will fail. You could refer compiled code of the program for more clarity.
- deepshikhaagrl March 18, 2016In case of objects created in heap via new, compiler won't call constructor/destructor implicitly and it is the responsibility of the programmer to call them. Hence, it will compile properly.