Software Developer Interview Questions

466,957 software developer interview questions shared by candidates

The first question is two find the largest and second largest value at each level of a binary tree. You don't need to return all values, just print out instead. the second question is to return a value in an array with the probability proportional to the weight of the value within the array. For example, in an array [4,5,6], return 4 with probability 4/15, 5 with 5/15 and 6 with 6/15. You are given a function that returns a random real number between 0 and 1
avatar

Software Engineer

Interviewed at Meta

3.5
Nov 7, 2016

The first question is two find the largest and second largest value at each level of a binary tree. You don't need to return all values, just print out instead. the second question is to return a value in an array with the probability proportional to the weight of the value within the array. For example, in an array [4,5,6], return 4 with probability 4/15, 5 with 5/15 and 6 with 6/15. You are given a function that returns a random real number between 0 and 1

In most cases you need to have some experience with CUDA. If you want to increase your chances of getting a job offer you need to know very well about linked lists. We used the collabedit.com for the interview. It is like a chat but for coding. I got the following question on the screen of collabedit: // There is a chunk of memory in the kernel address space represented by kernelResource and an API exists to clear it. An IOCTL path exists to take a request from user-mode and using O/S services eventually dispatches to API_ZeroResource. From a security perspective what concerns do you have with this implementation? How would you fix them? // // KERNEL // BYTE kernelResource[10] = {0}; int API_ZeroResource( in_params *pParams ) { if (pParams->offset + pParams->length > sizeof(kernelResource)) return ERR_INVALID_LIMIT; memset(kernelResource + pParams->offset, 0, pParams->length); return 0; } // // USER // void ZeroResource() { in_params params = { ??? }; // an ioctl path exists to call API_ZeroResource ioctl( CMD_ZeroResource, &params ); }
avatar

Software Engineer

Interviewed at NVIDIA

4.5
May 13, 2016

In most cases you need to have some experience with CUDA. If you want to increase your chances of getting a job offer you need to know very well about linked lists. We used the collabedit.com for the interview. It is like a chat but for coding. I got the following question on the screen of collabedit: // There is a chunk of memory in the kernel address space represented by kernelResource and an API exists to clear it. An IOCTL path exists to take a request from user-mode and using O/S services eventually dispatches to API_ZeroResource. From a security perspective what concerns do you have with this implementation? How would you fix them? // // KERNEL // BYTE kernelResource[10] = {0}; int API_ZeroResource( in_params *pParams ) { if (pParams->offset + pParams->length > sizeof(kernelResource)) return ERR_INVALID_LIMIT; memset(kernelResource + pParams->offset, 0, pParams->length); return 0; } // // USER // void ZeroResource() { in_params params = { ??? }; // an ioctl path exists to call API_ZeroResource ioctl( CMD_ZeroResource, &params ); }

An operation "swap" means removing an element from the array and appending it at the back of the same array. Find the minimum number of "swaps" needed to sort that array. Eg :- 3124 Output: 2 (3124->1243->1234) How to do it less than O(n^2) ?
avatar

Software Engineer Intern

Interviewed at Meta

3.5
Nov 3, 2012

An operation "swap" means removing an element from the array and appending it at the back of the same array. Find the minimum number of "swaps" needed to sort that array. Eg :- 3124 Output: 2 (3124->1243->1234) How to do it less than O(n^2) ?

Viewing 1131 - 1140 interview questions

Glassdoor has 466,957 interview questions and reports from Software developer interviews. Prepare for your interview. Get hired. Love your job.