Facebook | Phone | Valid Palindrome & Sorted Iterator
Anonymous User
3041
Aug 01, 2020
Sep 20, 2020
45-50 mins of Online Interview - Coderpad.
First 5 mins: Introduction
40Min: Coding Round
Last 5 Mins: Asking any questions
The interview consist of 2 problems
-
Sorted Iterator
Given N sorted array list, Implement a Data structure withhasNext()andnext()in sorted order.
e.g. Input
list 1 -> 4, 13, 17, 21, 85, 93
list 2-> 2, 9
list 3 -> 1, 5, 7, 18, 33Output
next() -> 1
next() -> 2
next() -> 4
next() -> 5
hasNext() -> true;
next() -> 7
next() -> 9
....next() -> 93
hasNext() -> false
Comments (12)


