Financial Software Developer Interview Questions |

Financial Software Developer Interview Questions


Financial software developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

write a function that returns the first unique element in an array

5 Answers

I wrote a sample program here. (I use map container here to replace hash_map. The doesnot work on my computer) #include "stdafx.h" #include #include using namespace std; static int find_unique_ele(char*,int); int _tmain(int argc, _TCHAR* argv[]) { char test[6] = {'a','b','c','b','c','a'}; int min_index = find_unique_ele(test,6); if (min_index store_table_value; map store_table; while(i ::const_iterator test_it = store_table.find(*test); if(test_it != store_table.end()){ store_table[*test] = -1; } else{ store_table.insert(map::value_type(store_table_value(*test,i))); } i++; test++; } map::const_iterator table_it = store_table.begin(); store_table_value temp_value = *table_it; int min_index = temp_value.second; while(++table_it != store_table.end()){ temp_value = *table_it; if(temp_value.second < min_index || min_index < 0){ min_index = temp_value.second; } } return min_index; }

I think in the above solution you have to scan the original array twice making it order (2n) or O(n). The 2nd scan is needed to determine the corresponding entry in the hash table whether it is unique or not. We need this to determine the first unique element in the array.

very easy with c++ stl using unique() function or use hashtable for O(1) look -up HashTable mm = new HashTable(myArray.count()); for(int i =0; i

int i=14; if (i=15) i++; How much is i?

4 Answers

2 pieces of string of different length and non-uniform width, each take one hour to burn. the remaining length of a burning string doesn't tell you how much longer it burns for. with a lighter measure 45 mins.

3 Answers

A rabbit wants to climb some stairs and it can do steps of 1 or 2. How many possible paths are there to follow ( e.g 1-1-1... or 2-2-2 ... or 2-1-2-1... etc)

6 Answers

template<class T1; class T2; class T3> int Product (T1 a, T2 b, T3 c) { return a * b * c; } What is the error in the sample code above?

4 Answers

You have a large data file, consisting of ten-digit numbers separated by new-line characters. Write a program in C to sort it, using at most 20MB of memory. Make it efficient.

4 Answers

how can I count the bit set to 1 in an integer? What if I want to optimize the process to work with several integers?

2 Answers

Would Java Bytecode generated by Java 7 work on a JVM made to function on Java 1.0?

2 Answers

Most efficient way to find the most frequent number (0-255) in a string of numbers

4 Answers

Classic one from them: You have an array and you want to find the first non-repeating element.

2 Answers
110 of 72 Interview Questions