A professor wants to see if two students have cheated when writing a paper. Design a function : hasCheated(String s1,String s2, int N) that evaluates to true if two strings have a common substring of length N. Additional question after implementation. Assume you don't have the possibility of using String.contains() and String.substring(). How would you implement this. Questions about complexity of my solution. Overall a very friendly interviewer, was saying "Good" the entire time, but no idea if he wanted to keep me focused or if it was really good.
Software Engineer Intern Interview Questions
9,334 software engineer intern interview questions shared by candidates
Fibonacci: recursive and iterative.
Find the length of a C-string, given a pointer to the first character.
Given a 2D array, find the sum of all the elements in the array. O(n^2) solution is too slow, find ways to optimize (ended up adding a second parameter 2D array).
About the details, and interviewer will communicate with you when you are typing.
To find least common ancestor in a binary search tree
Design and implement an algorithm to determine if a binary tree is symmetric.
Find the maximum subset sum in an array of numbers. Discuss complexity.
Heap Sorting. What data structure do you use to implement it? Time to access and sort. Code it.
Is it possible to sort using linear time a file with lots of numbers that contain duplicates, when there are no limits of resources or space?
Viewing 161 - 170 interview questions