# 18K

Programmer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date
Programmer Analyst was asked...August 30, 2013

### How many square feet of pizza is eaten in the US each year?

A pizza is roughly 1 sqft. If the average american eats 1/3 of a pizza and eats pizza 3 times a month, that would mean 12sqft a year. Times 200M americans that gives you 2.4 billion sqft. Less

Sorry, i must be stupid. I didn´t know pizza were made of feet.

All of them.

### Why did I want to work for the company.

And I like to helping people

Because I have heard positive things about this company and would like to contribute to it. Less

Because I have bills

### If a couple has two children, what is the probability that one is a girl and one is a boy?

It's a 1/2. The first child can be either a boy or a girl, for the second child to be the opposite gender the probability is 1/2. Or another way Boy Boy 1/4 Boy Girl ] 1/4 + Girl Boy ] 1/4 =1/2 Girl Girl 1/4 Less

1/2

Actually there are only 3 possibilities, doesn't matter the order. If the question was, what's the probability for the first to be a boy and the second to be a girl, than it would be 1/4. As such, the answer is 1/3 Less

### My strengths and weaknesses

My strength is Positive attitude and my weakness is i feel uncomfortable until finish my work Less

My strength is my confidence and my weakness is feel uncomfortable until finish my work Less

My strength is positive attitude and thinking and weakness is when I feel lonleyness Less

### What are the implications of covid-19

Basically the questions were to describe yourself, speak about COVID implications and winning the lottery. Just those 3 questions. Less

You were not required to code?

Was there a code challenge?

### How to check if a number is divisible by 16 without using operator / or % ?

should do using bit-wise operators

I will run a loop that'll subtract 16 from the number. If result is zero than it is divisible else if it goes less than zero than its is not. Less

Bit wise right shift four times, if integer then divisible.

You had a lucky escape my friend

Best thing ever is you got out of working for this bunch of amateurs. I still have the scars..... Less

Why is everyone who posts anonymous?

### More or less standard psychological questions during the Skype interview like: How you react when you feel bad or frustrated Describe how should be a perfect leader, or something like that

First and foremost, the responsibility that is an intricate part of managerial expertise is to evaluate the situation, in most cases, it is not a problem, just opportunity for a solution. Address the issue with the most of open mind. Evaluate your findings, make the proper decision, if it of your total control. If out of your total realm of responsibility, consult with next person in the upper management chain. Answering the original question, the experience of a good manager, is to address, evaluate, and sit on the other side of the desk. Make your decision of execution, and live with it, as long and foremost it is in the best interest of the Company. Cardinal rule, keep composure at all times, and gather the facts before making the decision. Less

I am sure that I just answered that question

Feeling bad, is a act of nature, unless self indulgent. If that be the case, mandatory self evaluation, and suffer the consequences internally. Do not effect others for your poor judgment. If truly I'll it the best response to seek a solution, and get over it as soon as possible. If it is out of your personal medical control, involve the next in command, and seek medical attention. A side note, attach your responsibility to the next in command, leaving them without total responsibility, as to the remaining issues of the day. If at all possible, leave an open means of communication, in light that you can be reached, With leadership comes changes that may occur that just a brief answer can give your leader in charge the onsite to make the best of the situation. Less

### Assume there is a method provided getNextperson() which gives Person objects which have comparable interface implemented, now read from a file records and sort it and give first 1000 records, write code on the paper

The question is actually quite simple since you were given that Comparable interface is already implemented (eg, public int compareTo(Object o) method is overridden in Person object). First step, 'read from a file all records' and store each Person object returned by getNextPerson() in List records = new ArrayList(). Next step, call Collections.sort(records) to sort (by criteria specified in compareTo() method, such as Last and First name, or any other meaningful parameter). Final step, 'give first 1000 records' -- either by iterating over first 1000 (checking size() &gt;= 1000) or by returning the list consisting of only 1000 records (either copy into a new list with size 1000 or by using removeRange method in ArrayList. Less

maybe use tree data structure

tree data structure ? i hope u meant to say "TreeSet"; but the question doesnt say that getNextPerson() will be unique. So let us not bank on treeSet. So just add them on to a arrayList and do a Collections.sort(arrayList); Less