Linkedin Interview Report
- 0of 0 votes
Answers/**
* A tournament tree is a binary tree
* where the parent is the minimum of the two children.
* Given a tournament tree find the second minimum value in the tree.
* A node in the tree will always have 2 or 0 children.
* Also all leaves will have distinct and unique values.
* 2
* / \
* 2 3
* / \ | \
* 4 2 5 3
*
* In this given tree the answer is 3.
*/
- lkpunisher April 05, 2017 in United Statesclass Node { Integer value; Node left, right; Node(Integer value, Node left, Node right) { this.value = value; this.left = left; this.right = right; } } class Solution { /** * This should return the second minimum * int value in the given tournament tree */ public static Integer secondMin(Node root) { } }
| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Trees and Graphs - 0of 0 votes
AnswersGiven a number n that represents n lockers and n students. All lockers start closed. First student goes and opens all the lockers. Second goes and toggles 2nd, 4th, 6th.. lockers. Third student toggles 3rd, 6th, 9th.. lockers. Print the lockers that remain open after all students pass.
- lkpunisher April 05, 2017 in United Statespublic void lockers(int n) { // Implementation here }
| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Math & Computation