Given a list of strings, write a function to calculate the longest common prefix (LCP) of all those strings.
Engineer Interview Questions
1,134,434 engineer interview questions shared by candidates
Given a binary tree, write a function to find the length of the longest path in the tree.
Write a function that computes log2() using sqrt().
Create a linked list with 3 char (A,B,C) in it and print the list in reverse.
Take in an Int array and move all the zeroes to the end in place. It doesn’t matter how the non-zero numbers are ordered. Preferably as efficient and as space efficient as possible. Example: Input : [ 3, 0, 2, 0, 0, 4, 1, 0 ] Accepted Output: [ 4, 2, 3, 1, 0, 0, 0, 0 ]
Write a C function to return the number of set bits in an integer.
Initialize a 5 by 5 array with this sequence. 1 2 3 4 5 6 4 8 9 10 11 12 9 14 15 16 17 18 16 20 21 22 23 24 25
Given the following struct definition in C, what would sizeof(myStruct) return? typedef struct { short a; long b; char c; } myStruct;
"Solve a maze", you have a 2D matrix with 1's as blocked and 0's as path. Find a path from one corner to another, backtracking should be allowed.
Explain the data structure you would use to implement pop() and push(Object, int) for a Priority Queue.
Viewing 441 - 450 interview questions