Traverse a binary there so that the order returned is ordered from smallest to greatest.
Intern Interviews
Intern Interview Questions
An intern works in a professional environment to gain practical, meaningful, and work-related experience in their chosen field or career. Interns are trainees who sign up to work for an organization for a short period of time to gain experience. Interns may be unpaid, partially paid, or paid.
Top Intern Interview Questions & How To Answer
Question #1: Can you tell me about a time you failed something, either in school or at a job?
Question #2: How did you land in this particular field?
Question #3: What do you hope to gain from this experience?
248,188 intern interview questions shared by candidates
2 Dice, we know the first one shows 6, what is the probability that both show 6
If i roll two dice and multiply the two outcomes, what is the probability of a perfect square?
there is a grey cube 3x3x3 was colored into red (all of its edges) . Next it was splitted into 1x1x1 cubes. 1 of these small cubes was chosen uniformly and uniformly thrown on a table. Find the P of "You can't see any red edges on this small cube"
Given a root to a binary tree where each node holds an integer. Write a method that returns the sum of all the integers in the tree.
Why do you want to work with Hilton?
Write a function in Java that will take a sorted array of ints, possibly with duplicates, and compact the array removing all the duplicate numbers. That is, if the contains the numbers - 1, 3, 7, 7, 8, 9, 9, 9, 10, then when the function returns, the contents should be - 1, 3, 7, 8, 9, 10. Be sure your answer is as efficient as possible. Describe the efficiency of your algorithm using big O notation.
Suppose there is a rectangular map where you can only travel up or right to go from a start location in the bottom left corner to the top right corner, and each move is discrete. Write a program that prints all possible solutions to get from the start to finish.
Write a function to determine if a bin tree is a valid BST. I wrote a fully working solution in 3-5 minutes. It was also the most optimal but maybe because she needed to kill time, she asked me to rewrite it in what she thought was optimal (her reasoning didn't make much sense). Then she asked me for time and space requirements of the solutions. I said O(n) for both which is correct but she insisted that the space requirement was O(logn) which is wrong.
Print a binary tree level by level
Viewing 171 - 180 interview questions