how to efficiently sort 2 or more arrays , when the 2nd array depends on the sorting of 1st array. If i use Bubble Sort then i will get TLE
Q-Sort Game , Approach to sorting 2 or more arrays
this problem is very simple using interface
just implement the comparable interface and write the compareTo method to sort according to given condition
https://ide.codingblocks.com/s/234889 you can take help of this code and understand the approach.
You need to create a separate class for Salary inputs and define a constructor to take input and compare function to remove redundant values.
I dont have much idea about collections yet , so should i do this once i have learnt collections?
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.