Computer Hardware & Software interview questions

Sort: Popular Date
Sort: Popular Date

“Given a set of numbers -50 to 50, find all pairs that add up to a certain sum that is passed in.

What's the O notation for what you just wrote?

Can you make it faster? Can you find an O(n…”

“Say I have a deck of 52 cards, regular deck of cards. I put a joker in the deck somewhere and shuffle it up. Now I start dealing you cards until the joker shows up. Once it shows up, I stop dealing…”

“In a stream of integers from 1 to n, only one number will be repeated. How can you tell what that number is?”

“Nothing to be frank. Go through all the questions posted here! Be prepared for a lot of behavioral questions.”

“Determine if an array from 1..n has a duplicate in constant time and space.”

“How to find a special weight ball from 8 balls while other 7 have the same weight with a balance? (all same color, shape etc.) Trick is that you don't know if the special ball is lighter or heavier.”

“class A {
    public A() {

    public void foo() {
            System.out.println("Class A");

class B extends A {
    public B(){}


“You are on a game show. There are three doors, behind one of which is a prize and the other two is a chunk of coal, and the host knows which door holds the prize. You choose door #1. Before it is…”

“Give an array of Integer which contain duplicate number from 1-100, how to count how many distinct number you have?”

3140 of 30,502 Interview Questions