Finance interview questions shared by candidates
Design an algorithm to find the first unique element in an array.
One possibility that comes in mind: * Walk the array, create a hashmap (key is the value in array, value is the count of such values). * Walk the array again and check the count in the hash map, once you hit 1, you have the first unique value. This is O(n) both space and time.
Are you sure that this is O(n), it is definitely O(n^2), you go over all items twice.
dear utk O(2n) = O(n) != O(n^2)...
See Interview Questions for Similar Jobs
- Software Engineer
- Software Developer
- Senior Software Developer
- Senior Software Engineer
- Technology Analyst
- Graduate Software Engineer
- Software Development Engineer
- Graduate Software Developer
- Financial Sales and Analytics
- Data Analyst
- Project Manager
- Summer Analyst
- Vice President
- Software Development Engineer II
- Software Engineer III
- Software Development Engineer I