Oracle Interview Question
Software DevelopersCountry: India
Interview Type: Phone Interview
in C++ this can be achieved by parallel computation by running threads. The following pseudo code will give the number of threads needed to run for 50 lakh entries
min_per_thread = 100000;
max_threads = (5000000 + (100000 -1)) / min_per_thread;
hardware_threads_supported = std::thread::hardware_concurrency();
min_thread = std::min(if(hardware_threads_supported ==0 ? 2 : max_threads) ;
The above code will give the number threads required to process 50 lakh entries in parallel
Basic things first. How can we store data inside a queue in a parallel way.Since we can only store it one at a time.
- Sibendu Dey June 15, 2016