140 Users, 306 Questions

A collection of technical interviews questions in PDF format. pdf
(Last updated on 12/03/2008)


Latest questions | Browse all questions

knight's tour

Views:44,Comments:0,Saved by 1 2010-02-01 10:30:56 | spellscroll

On an empty NxN chessboard, a knight starts from a point (say location x, y) and
it starts moving randomly, but once it moves out of board, it can’t ...


Shortest supersequence of all permutations

Views:24,Comments:0,Saved by 1 2010-02-01 08:16:06 | spellscroll

Let $ \Sigma = \{ x_1 \ldots x_k \} $ be a finite alphabet, and $ \alpha, \beta \in \Sigma^{*} $. $ \alpha $ is a supersequence of $ \beta ...


dictionary order

Views:218,Comments:0,Saved by 1 2009-12-06 06:28:05 | spellscroll

Given a list of strings, find a concatenation of all the strings such that
its dictionary order is the smallest among all the possibilities.

For instance, ...

Tags: sorting(1) string(1) algorithm(1)

valid block

Views:175,Comments:0,Saved by 1 2009-12-05 10:48:06 | spellscroll

Given an array A which holds a permutation of 1,2,...,n. A sub-block A[i..j]
of an array A is called a valid block if all the numbers appearing in A[i..j] ...

Tags: algorithm(1)

random walk on a sphere

Views:252,Comments:0,Saved by 1 2009-11-06 10:26:16 | spellscroll

A guy starts walking from position x_0 on earth (we treat earth as a sphere
with radius R). He randomly chooses a direction and walk 1 meter (this is ...


Welcome!
spellscroll.com is a collaboratively edited site for sharing and discussing programming interview questions, math puzzles, and brainteasers.