3 rounds of interviews, first 2 with engineers and the third one with engineering manager. After that HR round and offer negotiation:
public void printDuplicates(int[] numbers){
for(int i=0; i < numbers.length; i++){
int mapKey = Math.abs(numbers[i]);
if(numbers[mapKey] < 0){
System.out.print(Math.abs(numbers[i]) + " ");
}else {
numbers[mapKey] = -numbers[mapKey];
}
}
}2- validate parentheses O(n) space/time: https://leetcode.com/problems/valid-parentheses/
3- parse a string to int without using pre built functions: https://leetcode.com/problems/string-to-integer-atoi/