I have more than 6 years of experience, I recently got twillio OA.
It was for 75 minutes, there were two questions.
For ex:
INPUT: 3,4,2,3
OUTPUT: 3,3,2,4
I solved first one completely, second one had few failing cases I think because of timeouts because I solved them using Java 8 lambdas and multiple sorts and generating streams which caused it to be slow and I didn't have enough time to rewrite it in the normal way.
============EDIT==============
My solution was something like,
Create a frequency map with key as the number and its frequency as the value, lets call that 'fr'
return fr.entrySet().stream().sorted(MyComaparator).flatMap(s -> Stream.generate(s.getKey()).limit(s.getValue())).collect(Collectors.toList())
class MyComparator will have normal comparison logic, first compare frequency and then compare value.Thanks to @mukesh_kumar for suggesting the leetcode problem for the second one. I have added that link as well