Given a binary tree, how would you set the keys/values of all the nodes and their child pointers to null. No language restriction. Do it iteratively in O(N) time with O(1) space complexity where N is the number of nodes in the tree. Other Details: - Tree is just a regular Binary Tree and doesn't have the BST property. - It is not guaranteed to be balanced. - You may do whatever you want to the tree however, you must ensure that all the nodes in the tree and their left/right pointers are set to null.
Development Interview Questions
137,183 development interview questions shared by candidates
how many zeros are there in 100!
How to Develop Brand Availability
Tell me about a time that you didn't get along with your supervisor. How did you go about fixing the relationship with him or her while still managing to do your job well?
1) 6 hours problem - Walls and Guards, use triple loop as a solutions and matrix. 2) Live coding question - 3 boxes with apples, oranges and apple and oranges, famous problem.
Why did you apply to work at Coca-Cola?
Using only putchar how would you print out the ascii values for each digit in an integer. For example if the integer was 123, then you would want to print the ascii values for 1, 2, and 3.
Given an infinite stream of numbers, find the top 50 integers. What's the data structure to use, and what's the time complexity.
Write a program to find the square root of a double.
Write a function to search for a string within another string. Analyze it's complexity, and propose optimizations.
Viewing 161 - 170 interview questions