Give 2 coding solutions on returning an array by removing duplicates. One solution with O(n^2) and the other Linear.
Programmer Trainee Interview Questions
712,996 programmer trainee interview questions shared by candidates
Given an array whose elements are sorted, return the index of a the first occurrence of a specific integer. Do this in sub-linear time. I.e. do not just go through each element searching for that element.
Write a function in C/C++ that returns the number of zeros contained in the factorial of the number that is passed to it.
print out the powset of a set. use any programming language you want.
Write a function that will return the second longest string in a list of strings. You have to do a single pass on the list.
How to add a counter to www.google.com to track the billionth user.
Find the lowest common ancestor for BST
I was asked a question about the following. If a user types in a n digit number on the telephone, how do you write a function to deduce if the number constitutes a valid word. For example, if the user enters 123, then can a valid word be made out of (a/b/c) + (d/e/f) + (g/h/i)
Reverse a linked list in place
Pets +------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | breed | varchar(255) | NO | | NULL | | | acquisition_date | datetime | NO | | NULL | | +------------------+--------------+------+-----+---------+----------------+ Customers +-------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | name | varchar(255) | NO | | NULL | | +-------+--------------+------+-----+---------+----------------+ Sales +-------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------+------+-----+---------+-------+ | customer_id | int(11) | NO | PRI | NULL | | | pet_id | int(11) | NO | PRI | NULL | | | date | datetime | NO | | NULL | | +-------------+----------+------+-----+---------+-------+ Q1 How many pets of each breed has the shop ever owned?
Viewing 1481 - 1490 interview questions