I attended an interview with Standard Chartered on 20th Oct 2019. I hold about 9 years of exp in java.
There is only one round that was the written round.
- Find the exact pair of the numbers in an array whose sum of values is equal to targets. Assume that there is only such a pair. This implementation needs to be done in O(n).
- Find the prime factors of the given number and the output should be as 15-> 5, 3 and 9->3*3
-
Given the array of numbers with positive and negative values. Arrange them so that all negative values appear first and positive next without changing the relative order.
input: [-15, -17, -2, 19, -34, 5, 19, 0] output: [-15, -17, -2, -34, 19, 5, 19, 0]