Ist site:-

Question: Assume you have an array that contains a number of strings (perhaps char * a[100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams within the array (two words are anagrams if they contain the same characters; for example, tales and slate are anagrams.)

 

II nd Site:-

Riddles

Woman 1: 1 minute to cross
Woman 2: 2 minutes to cross
Woman 3: 5 minutes to cross
Woman 4: 10 minutes to cross

For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?


Algorithms

·                 cwd xor ax, dx sub ax, 
        dx

Applications


Thinkers

 

 

 

III rd Site:-

 

 

 

How do you multiply a variable by 16 without using the multiplication operator '*'?


2.5 out of 5 stars(Avg. of 79 ) : What if you have to multiply by 15?


3 out of 5 stars(Avg. of 66 ) : How can computer technology be integrated into an elevator system for a hundred story office building? How do you optimize for availability? How would variation of traffic over a typical work week or floor or time of day affect this? How would you test this system?


1.5 out of 5 stars(Avg. of 91 ) : How would you redesign an ATM?


2.5 out of 5 stars(Avg. of 29 ) : Suppose we wanted to control different parts of a home using a Computer. What kind of software would you write to do this?


2.5 out of 5 stars(Avg. of 27 ) : What is a balanced tree?


3 out of 5 stars(Avg. of 18 ) : What is disk interleaving? Why do you need it?


2.5 out of 5 stars(Avg. of 17 ) : What are various problems unique to distributed databases?


2.5 out of 5 stars(Avg. of 13 ) : How would you decide what to test for given that there isn't enough time to test everything you want to.


2.5 out of 5 stars(Avg. of 29 ) : Some general questions on Lex Yacc etc.


2.5 out of 5 stars(Avg. of 16 ) : Fundamentals of RPC.


2.5 out of 5 stars(Avg. of 9 ) : Tradeoff between time spent in testing a product and getting into the market first.


3 out of 5 stars(Avg. of 9 ) : You're implementing the software for a IP router. When a packet comes in, the router has to decide which link to route the packet out on, based on it's destination IP address. Don't worry about changes in load - a packet destined for a given IP address will always go out the same link. How would you implement this? Optimized for speed? For space?


3 out of 5 stars(Avg. of 34 ) : Find the fastest, simplest algorithm you can for determining if two rectangles overlap.


2.5 out of 5 stars(Avg. of 13 ) : You're part of the QA team for a large web-site. You want to create as much automated testing as possible. What could/would you test? How? How much maintenance would these tests require as the web site changes?


2.5 out of 5 stars(Avg. of 13 ) : What would be your language of choice for implementing CGI programs on a web server? Why?


3 out of 5 stars(Avg. of 10 ) : How do you swap two integers without using any extra memory?


2 out of 5 stars(Avg. of 5 ) : Describe the most interesting software project you've done in school.


2.5 out of 5 stars(Avg. of 8 ) : What was the most difficult program you had to write?


2.5 out of 5 stars(Avg. of 5 ) : What are the steps you take to write a program?


2.5 out of 5 stars(Avg. of 8 ) : What is the difference between multitasking and multithreading and how does it work in vxWorks?


2.5 out of 5 stars(Avg. of 7 ) : Name 7 layers of OSI models and define their functionality.


2.5 out of 5 stars(Avg. of 15 ) : OSI layers and what devices work at each layer, examples of netowrk topology, when and why you would use each, pros and cons of each, etc.


2.5 out of 5 stars(Avg. of 6 ) : What layer of the OSI model does routers work on?


2.5 out of 5 stars(Avg. of 10 ) : Explain inheritance


1.5 out of 5 stars(Avg. of 5 ) : What is a linked list


2.5 out of 5 stars(Avg. of 14 ) : How will you test vending machine?


2.5 out of 5 stars(Avg. of 16 ) : How would you go about learning a new programming language under high-pressure conditions?

 

 

 

Why is a manhole cover round?

 

Given a rectangular cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?

 

If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?

 

One train leaves Los Angeles at 15 MPH heading for New York. Another train leaves from New York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from Los Angeles at the same time as the train and flies back and forth between the two trains until they collide, how far will the bird have traveled?

 

If you could remove any of the 50 states, which state would it be and why?

 

 

There are four people who need to cross a bridge at night. The bridge is only wide enough for two people to cross at once. There is only one flashlight for the entire group. When two people cross, they must cross at the slower member's speed. All four people must cross the bridge in 17 minutes, since the bridge will collapse in exactly that amount of time. Here are the times each member takes to cross the bridge:


So, if Person A and C crossed the bridge initally, 5 minutes would elapse, because Person C takes 5 minutes to cross. Then, Person A would have to come back to the other side of the bridge, taking another minue, or six minutes total. Now, if Person A and D crossed the bridge next, it would take them 10 minutes, totalling to 16 minutes. If A came back, it would take yet another minute, totally 17... the bridge would collapse with A and B on the wrong side. How can all four people get across the bridge within 17 minutes? Note: there is no trick-answer to this problem. You can't do tricky stuff like throwing the flashlight back from one end of the bridge to the other. This problem can be solved!

 

 

You have someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?

 

 

You have 5 jars of pills. Each pill weighs 10 gram, except for contaminated pills contained in one jar, where each pill weighs 9 gm. Given a scale, how could you tell which jar had the contaminated pills in just one measurement?

 

 

You have 12 balls. All of them are identical except one, which is either heavier or lighter than the rest - it is either hollow while the rest are solid, or solid while the rest are hollow. You have a simple two-armed scale, and are permitted three weighings. Can you identify the odd ball, and determine whether it is hollow or solid? ( This question is same as above but with an additional twist).

 

 

If you are on a boat and you throw out a suitcase, will the level of water increase?

 

There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don't collide?

 

There are three wise men in a room. So you decide to give them a challenge. Suspecting that the thing they care about most is money, you give them $100 and tell them they are to divide this money observing the following rule: they are to discuss offers and counter-offers from each other and then take a vote. Majority vote wins. Sounds easy enough... now the question is, assuming each person is motivated to take the largest amount possible, what will the outcome be? ( submitted by : mikeprimeau@ottawa.com)

 

 

Three men were renting a motel figuring the room cost 30 dollars they would pitch in ten a piece.The room was only 25 so they each gave the bell boy ten,(tip)the bellboy didn"t think that would be fair so he gave them each back 1 dollar and kept 2 for himself.What happened to the other dollar? ( sent by MACsabastion@webtv.net )

 

 

You have b boxes and n dollars. If I want any amount of money from 0 to n dollars, you must be able to hand me 0 to b boxes so that I get exactly what I request." The two questions were "What are the restrictions on b and n, and how is money distributed among the boxes?"

 

There are 2 rooms. First has 3 switches (on/off) and the other one has 3 bulbs (electric lamps). Initially all the switches are off and all bulbs are turned off. Every bulb is connected to one switch and only one. First you are in the room with switches. You can play with switches however you want and whenever you want, but in the rooms with bulbs you can enter only once. Find the correspondence between switches and bulbs. - (Sent by Oliviu Burlacu)

 

There is a prisioner who has two doors infront of him one leads to freedom and one leads to hell, he has no idea which one is which, but there is 2 guards there on tell the truth and one always lies. You can ask them one question that will lead you to your freedom. What is your question? - (Sent by Karl Hamaoui)

 

If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? ( The answer to this is not zero!)

 

What is the sum of the numbers from 1 to 1000?

 

You are an employer. You have ten employees. Each month, each one of your ten employees gives you ten bags of gold. Each bag of gold has ten pieces of gold in it. Each piece of gold weighs one pound. One of your employees is cheating you by only putting nine pieces of gold in each of his ten bags of gold. You have a scale (not a balance, a scale), and you can only take one measurement from the scale, only one (1) reading.

How can you tell which of the ten employees is cheating you by using this scale and only taking one measurement?

How many points are there on the globe where by walking one mile south, one mile east and one mile north you reach the place where you started.

 

Imagine that you have 26 constants, labelled A through Z. Each constant is assigned a value in the following way: A = 1; the rest of the values equal their position in the alphabet (B corresponds to the second position so it equals 2, C = 3, etc.) raised to the power of the preceeding constant value. So, B = 2 ^ (A's value), or B = 2^1 = 2. C = 3^2 = 9. D = 4^9, etc., etc. Find the exact numerical value to the following equation:
     (X - A) * (X - B) * (X - C) * ... * (X - Y) * (X - Z)

 

 

You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize the chances of a red marble being picked? What are the exact odds of getting a red marble using your scheme

 

How would go about finding out where to look for a book in a library? (You do not know how the books are organized beforehand)

 

Imagine you are standing in front of a mirror, facing it. Raise your left hand. Raise your right hand. Look at your reflection. When you raise your left hand your reflection raises what appears to be his right hand. But when you tilt your head up, your reflection does too, and does not appear to tilt his/her head down. Why is it that the mirror appears to reverse left and right, but not up and down?

 

 

You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?

 

 

You are given a scale which you are to use to measure eight balls. Seven of these balls have the same weight: the eigth ball is heavier than the rest. What is the minimum number of weighs you could perform to find the heaviest of the eight balls?. Remmber it's a scale not a balance. (i.e. It can just tell you if one side is heavier than the other it can't give you the exact weight).

 

You are given two 60 minute long fuse ropes (ie. the kind you'd find on the end of a bomb) and a lighter. The fuses do not necessarily burn at a fixed rate. For example, given an 8 foot rope, it may take 5 minutes for the first 4 feet of the fuse to burn, while the last 4 feet could take 55 minutes to burn (a much slower rate) (5+55=60 minutes). Using these two fuses and the lighter, how can you determine 45 minutes? HINT: You can use the lighter any number of times

 

How would you design a toaster?

 

How would you design an universal remote control?

 

How would you design a clock for a blind person?

 

 

 

A cable, 16 meters in length, hangs between two pillars that are both 15 meters high. The ends of the cable are attached to the tops of the pillars. At its lowest point, the cable hangs 7 meters above the ground. Question: How far are the two pillars apart? ( Sent by Oliviu Burlacu )

 

 

 

There was a sheriff in a town who caught three outlaws. He said he was going to give them all a chance to go free. All they had to do is figure out what color hat they were wearing. The sheriff had 5 hats 3 black and 2 white. The first guy guessed and was wrong so he was put in jail. The second guy also guessed and was also put in jail. finally, a third blind man guessed and he guessed correctly. How did he know?

 

 

There are n couples attending a party. Each one shakes hands with the persons he doesn't know. (Assuming each person knows his/her partner) Mary and John are a couple. John asked the rest of the party-attenders how many times he has shaken hands. Each one gives a unique answer. How many times does Mary shake hands?

 

 

 

 

How would you find a cycle in a linked list? Try to do it in O(n) time. Try it using a constant amount of memory.

2.5 out of 5 stars(Avg. of 64 ) : Given a history of URLs, how would you determine if a particular URL had been seen before?

2.5 out of 5 stars(Avg. of 10 ) : Since pages can have multiple URLs pointing to them, how can you make sure you've never seen the same CONTENT before?

2.5 out of 5 stars(Avg. of 28 ) : Write a function to print the Fibonacci numbers.

2.5 out of 5 stars(Avg. of 32 ) : Write a function to print all of the permutations of a string.

2.5 out of 5 stars(Avg. of 20 ) : Design a memory management scheme.

3 out of 5 stars(Avg. of 28 ) : Give a one-line C expression to test whether a number is a power of 2. Now implement it without using loops.

3 out of 5 stars(Avg. of 9 ) : Implement an algorithm to sort a linked list.

2.5 out of 5 stars(Avg. of 5 ) : Implement strstr(), strcpy(), strtok() etc..

2.5 out of 5 stars(Avg. of 17 ) : Reverse a string.

2.5 out of 5 stars(Avg. of 6 ) : Given a linked list which is sorted, how will you insert in sorted way.

3 out of 5 stars(Avg. of 18 ) : Give me an algorithm and C code to find the subarray with the largest sum given an array containing both positive and negative integers.

2.5 out of 5 stars(Avg. of 9 ) : Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it.

2.5 out of 5 stars(Avg. of 10 ) : Come up with the plan on how to traverse a graph, as well as to quickly determine if a given URL is one of the million or so you've previously seen.

2.5 out of 5 stars(Avg. of 15 ) : A square picture is cut into 16 squares and they are shuffled. Write a program to rearrange the 16 squares to get the original big square.

2.5 out of 5 stars(Avg. of 7 ) : The Web can be modeled as a directed graph. Come up with a graph traversal algorithm. Make the algorithm non-recursive and breadth-first.

2.5 out of 5 stars(Avg. of 12 ) : Implement an algorithm to reverse a singly linked list. (with and without recursion)

2 out of 5 stars(Avg. of 8 ) : Implement an algorithm to reverse a doubly linked list.

2 out of 5 stars(Avg. of 3 ) : Implement an algorithm to insert in a sorted list.

2 out of 5 stars(Avg. of 4 ) : Delete an element from a doubly linked list.

2.5 out of 5 stars(Avg. of 5 ) : Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B.

2.5 out of 5 stars(Avg. of 5 ) : Implement an algorithm to sort an array.

1.5 out of 5 stars(Avg. of 2 ) : Given a sequence of characters, how will you convert the lower case characters to upper case characters?

2 out of 5 stars(Avg. of 4 ) : Write a routine that prints out a 2-D array in spiral order.

2 out of 5 stars(Avg. of 5 ) : Give a fast way to multiply a number by 7.

3 out of 5 stars(Avg. of 6 ) : Count the number of set bits in a number without using a loop.

2 out of 5 stars(Avg. of 5 ) : Give me an algorithm and C code to shuffle a deck of cards, given that the cards are stored in an array of ints. Try to come up with a solution that does not require any extra space.

2 out of 5 stars(Avg. of 3 ) : Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value.

1.5 out of 5 stars(Avg. of 2 ) : How would you print out the data in a binary tree, level by level, starting at the top?

0.5 out of 5 stars(Avg. of 1 ) : Do a breadth first traversal of a tree.

1.5 out of 5 stars(Avg. of 2 ) : Write a routine to draw a circle given a center coordiante (x,y) and a radius (r) without making use of any floating point computations.

3 out of 5 stars(Avg. of 5 ) : Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words in it.

1.5 out of 5 stars(Avg. of 13 ) : Implement a TIC-TAC-TOE game assuming Computer as one of the player. Optimize it for fast computer play time and space. Do some analysis on memory and processing requirements .

2.5 out of 5 stars(Avg. of 8 ) : Write a function to find the depth of a binary tree.

3 out of 5 stars(Avg. of 8 ) : You are given two strings: S1 and S2. Delete from S2 all those characters which occur in S1 also and create a clean S2 with the relevant characters deleted.

1.5 out of 5 stars(Avg. of 2 ) : Write a small lexical analyzer for expressions like "a*b" etc.

0.5 out of 5 stars(Avg. of 1 ) : Given an array t[100] which contains numbers between 1 and 99. Return the duplicated value. Try both O(n) and O(n-square).

0.5 out of 5 stars(Avg. of 2 ) : Write efficient code for extracting unique elements from a sorted list of array.

3 out of 5 stars(Avg. of 5 ) : Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list).

2 out of 5 stars(Avg. of 3 ) : Print an integer using only putchar. Try doing it without using extra storage.

1.5 out of 5 stars(Avg. of 2 ) : Write a function that allocates memory for a two-dimensional array of given size(parameter x & y)

2 out of 5 stars(Avg. of 3 ) : Write source code for printHex(int i) in C/C++

2.5 out of 5 stars(Avg. of 2 ) : Do the class/structure description for a Hash table, and write the source code for the insert function.

0.5 out of 5 stars(Avg. of 1 ) : What sort of technique you would use to update a set of files over a network, where a server contains the master copy.

1.5 out of 5 stars(Avg. of 2 ) : How do you handle deadlock on a table that is fed with a live serial feed?

0.5 out of 5 stars(Avg. of 1 ) : What would you suspect if users report they are seeing someone else's data on their customized pages?

2 out of 5 stars(Avg. of 2 ) : How would you implement a hash table ? How do you deal with collisions.?

0.5 out of 5 stars(Avg. of 2 ) : How would you do conditional compilation ?

2.5 out of 5 stars(Avg. of 7 ) : Write an algorithm to draw a 3D pie chart ?

3 out of 5 stars(Avg. of 7 ) : Prove that Dijkstra's MST algorithm indeed finds the overall MST.

1.5 out of 5 stars(Avg. of 2 ) : How would you implement a queue from a stack?

0.5 out of 5 stars(Avg. of 1 ) : Write a funtion that finds repeating characters in a string.

1.5 out of 5 stars(Avg. of 2 ) : Write a routine to reverse a series of numbers without using an array.

1.5 out of 5 stars(Avg. of 2 ) : Write a function to find the nth item from the end of a linked list in a single pass.

0.5 out of 5 stars(Avg. of 1 ) : Write a function to compute the factorial of a given integer.

2.5 out of 5 stars(Avg. of 6 ) : Give me an algorithm for telling me the number I didn't give you in a given range of numbers. (Numbers are given at random)

2.5 out of 5 stars(Avg. of 2 ) : Write a function that finds the last instance of a character in a string.

2.5 out of 5 stars(Avg. of 12 ) : Say you have three integers between 0-9. You have the equation: A!+B!+C! = ABC (where ABC is a three digit number, not A*B*C). Find A, B, and C that satisfies this equation (Sent by ryan-whaey@uiowa.edu)

3 out of 5 stars(Avg. of 13 ) : write a function to print all permutations of a string

 

 

 

 

 

. First some definitions for this problem:

    a) An ASCII character is one byte long and the most significant bit in the byte is always '0'.

    b) A Kanji character is two bytes long. The only characteristic of a Kanji character is that in its first byte the most significant bit is '1'.

     Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array.The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).

28. Write a routine that prints out a 2-D array in spiral order!

 

TRY http://msnhomepages.talkcity.com/WindowsWay/fariaz/
 
 
 
 
 
 
 
 

problem: you have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.

question: what state are the doors in after the last pass? which are open which are closed?

 

problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the jars such that when you blindly pick one marble out of one jar, you maximize the chances that it will be red. (when picking, you'll first randomly pick a jar, and then randomly pick a marble out of that jar) you can arrange the marbles however you like, but each marble must be in a jar.

 
problem: two trains enter a tunnel 200 miles long (yeah, its a big tunnel) travelling at 100 mph at the same time from opposite directions. as soon as they enter the tunnel a supersonic bee flying at 1000 mph starts from one train and heads toward the other one. as soon as it reaches the other one it turns around and heads back toward the first, going back and forth between the trains until the trains collide in a fiery explosion in the middle of the tunnel (the bee survives). how far did the bee travel?
 
 
 

two MIT math grads bump into each other at Fairway on the upper west side. they haven't seen each other in over 20 years.

the first grad says to the second: "how have you been?"
second: "great! i got married and i have three daughters now"
first: "really? how old are they?"
second: "well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there.."
first: "right, ok.. oh wait.. hmm, i still don't know"
second: "oh sorry, the oldest one just started to play the piano"
first: "wonderful! my oldest is the same age!"

problem: how old are the daughters?

 
 
problem: you are given a sequence of numbers from 1 to n-1 with one of the numbers repeating only once. (example: 1 2 3 3 4 5). how can you find the repeating number? what if i give you the constraint that you can't use a dynamic amount of memory (i.e. the amount of memory you use can't be related to n)? 
what if there are two repeating numbers (and the same memory constraint?)
 
 
 
 

five pirates have 100 gold coins. they have to divide up the loot. in order of seniority (suppose pirate 5 is most senior, pirate 1 is least senior), the most senior pirate proposes a distribution of the loot. they vote and if at least 50% accept the proposal, the loot is divided as proposed. otherwise the most senior pirate is executed, and they start over again with the next senior pirate. what solution does the most senior pirate propose? assume they are very intelligent and extremely greedy (and that they would prefer not to die).

 
 

100 fogcreek programmers are lined up in a row by an assassin. the assassin puts red and blue hats on them. they can't see their own hats, but they can see the hats of the people in front of them. the assassin starts in the back and says "what color is your hat?" the fogcreek programmer can only answer "red" or "blue." the programmer is killed if he gives the wrong answer; then the assassin moves on to the next programmer. the programmers in front get to hear the answers of the programmers behind them, but not whether they live or die. they can consult and agree on a strategy before being lined up, but after being lined up and having the hats put on, they can't communicate in any way other than those already specified. what strategy should they choose to maximize the number of programmers who are guaranteed to be saved?

 

 

this is a classic problem which i have heard many times before. this is the "harder" of the two problems, since in this one, you do not know if the invalid item weighs more or less than the others. solving it is only half the battle. writing up a solution that anyone including your grandma could understand, is very hard.

problem: the evil king from before sends his own assassin to take care of the evil queen who tried to poison him. of course, her trusty guards catch the assassin before any harm is done. the queen notices that the assassin is quite handsome and doesn't really want to punish him by death. she decides to test his wisdom.

the queen gives the assassin 12 pills which are all completely identical in shape, smell, texture, size, except 1 pill has a different weight. the queen gives the man a balance and tells him that all the pills are deadly poison except for the pill of a different weight. the assassin can make three weighings and then must swallow the pill of his choice. if he lives, he will be sent back to the bad king's kingdom. if he dies, well, thats what you get for being an assassin.

only one pill is not poison and it is the pill which has a different weight. the assassin does not know if it weighs more or less than the other pills. how can he save his skin?

 
 
 
 
 
 

a man has a gold chain with 7 links. he needs the service of a laborer for 7 days at a fee of one gold link per day. however, each day of work needs to be paid for separately. in other words, the worker must be paid each day after working and if the laborer is ever overpaid he will quit with the extra money. also he will never allow himself to be owed a link. what is the fewest # of cuts to the chain to facilitate this arrangement and how does that guarantee payment?

 

a one armed surgeon with a hand wound needs to operate on three patients. the surgeon only has two gloves. how can he operate on the three patients in turn without risking exchange of fluids? (remember he only has one arm so he only needs to wear one glove at a time.)

 

part I: what is the angle between the minute hand and the hour hand at 3:15 on an analog clock? no, its not 0. part II: how often does the minute hand pass the hour hand on an analog clock?


those screwy pirates are at it again. this time there are 13 pirates and they need to protect their treasure chest. they decide that they should only be able to open the chest if the majority (at least 7) agree that it should be opened. they ask a locksmith to come and put a specific number of locks on the safe. every lock must be opened to open the chest. there can be multiple keys for each lock, but each key only opens one lock (i.e. no skeleton keys). the locksmith can give more than one key to each pirate. how many locks should the locksmith use and what strategy should he use to distribute the keys, such that only when a majority of the pirates agree can the chest be opened?
 
 

this is difficult to describe in words, so read this carefully, lest there be any confusion. you have a normal six sided cube. i give you six different colors that you can paint each side of the cube with (one color to each side). how many different cubes can you make? different means that the cubes can not be rotated so that they look the same. this is important! if you give me two cubes and i can rotate them so that they appear identical in color, they are the same cube.

 

a person dies, and arrives at the gate to heaven. there are three doors. one of them leads to heaven. another one leads to a 1-day stay at hell, and then back to the gate, and the other leads to a 2-day stay at hell, and then back to the gate. every time the person is back at the gate, the three doors are reshuffled. how long will it take the person to reach heaven? this is a probability question - i.e. it is solvable and has nothing to do with religion, being sneaky, or how au dente the pasta might be ;-)

a man has two cubes on his desk. every day he arranges both cubes so that the front faces show the current day of the month. what numbers are on the faces of the cubes to allow this?

 

you can go to a fast food restaurant to buy chicken nuggets in 6-pack, 9-pack or 20-packs. is there such a number N, such that for all numbers bigger than or equal to N, you can buy that number of chicken nuggets?

 

you have two identical crystal orbs. you need to figure out how high an orb can fall from a 100 story building before it breaks. you know nothing about the toughness of the orbs: they may be very fragile and break when dropped from the first floor, or they may be so tough that dropping them from the 100th floor doesn't even harm them. what is the largest number of orb-drops you would ever have to do in order to find the right floor? (i.e. what's the most efficient way you could drop the orbs to find your answer?)

how many trailing zeroes are there in 100! (100 factorial)?
 
 
 

you have $10,000 dollars to place a double-or-nothing bet on the Yankees in the World Series (max 7 games, series is over once a team wins 4 games). unfortunately, you can only bet on each individual game, not the series as a whole. how much should you bet on each game, so that, if the yanks win the whole series, you expect to get 20k, and if they lose, you expect 0? basically, you know that there may be between 4 and 7 games, and you need to decide on a strategy so that whenever the series is over, your final outcome is the same as an overall double-or-nothing bet on the series.

 

you are an oil mogul considering the purchase of drilling rights to an as yet unexplored tract of land. the well's expected value to its current owners is uniformly distributed over [$1..$100]. (i.e., a 1% chance it's worth each value b/w $1..$100, inclusive). bcause you have greater economies of scale than the current owners, the well will actually be worth 50% more to you than to them (but they don't know this). the catch: although you must bid on the well before drilling starts (and hence, before the actual yield of the well is known), the current owner can wait until *after* the well's actual value is ascertained before accepting your bid or not. what should you bid?

 

it's the middle ages, you're travelling across europe and you want to find the way to vienna. you come to a crossroads, now there are two ways to go. at the crossroads stand a knight and a knave. the knight answers every question truthfully. the knave answers every question falsely. you don't know which guy is which. how can you figure out which road leads to Vienna by only asking one question?

        1
  | 6 | 4 | 3 |
  =============
  | 2 | 7 | 5 |
  =============
      | 8 |
      =====
 
 
 
you have 12 coins.  one of them is counterfeit.  all the good coins weigh the same, while the counterfeit one weights either more or less than a good coin.