Given a collection of numbers, it has two functions: insert() and getMedian(). Choose a data structure to construct this collection and design the insert() and getMedian() function. Explain the time complexity of each function.
Programmer Intern Interview Questions
715,910 programmer intern interview questions shared by candidates
This round consists of 6 competitive coding questions and you need to solve at least 4 to get you through.
What is java?
public class Person { Person father; Person mother; Gender gender; Integer age; List<Person> children; int level = 0; public enum Gender { Male, Female; } } For the above class, you basically have to implement 2 methods. public List<Person> getOldestSisters() public List<Person> getGreatestAncestors()
Given a string s="my name is anny" print it in this manner: m n i a y a s n m m e y ie first letter of every word in the string
basics
Basic Java Questions: Annonymous Classes, Nested Classes etc.
MCQ Round had programming questions of moderate difficulty
You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)
Write code to parse a string and count the number of occurrences of each word.
Viewing 721 - 730 interview questions