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 Intern Interview Questions
17,740 software intern interview questions shared by candidates
Design a system to store large numbers and a function to add them.
Fibonacci: recursive and iterative.
Fibonacci Numbers - Iteratively and Recursively
Questions asked included (only) printing the nodes of a linked list in reverse, finding the longest palindrome in a given string, finding maximum subarray sum (similar to Kadane's Algorithm) with the constraint that two numbers in the array that form the max sum cannot be next to each other.
Find the length of a C-string, given a pointer to the first character.
Find the maximum subset sum in an array of numbers. Discuss complexity.
Design and implement an algorithm to determine if a binary tree is symmetric.
In linux, a folder consists of 10000 files and some files contain US phone numbers. What would you do to display the names of files containing US phone numbers?
Write a function that returns the depth of a tree.
Viewing 231 - 240 interview questions