Puzzle CornerSign In
HomeFeedbackBlogResourcesAbout
Starred
Add Question
All (696)
coding (266)
c++ (157)
algorithms (151)
puzzle (134)
CS Fundamentals (83)
oop (55)
arrays (45)
internet (40)
string (34)
math (31)
databases (28)
system (26)
probability (26)
networking (25)
linkedlist (24)
binarytrees (24)
tree (22)
bit manipulation (19)
sorting (11)
stack (10)
bst (9)
java (8)
xml (8)
sql (7)
next in series (7)
traversal (6)
graph (4)
debugging (4)
lateral thinking (4)
palindrome (4)
mysql (4)
prime (4)
general (4)
unix (3)
CGI (3)
duplication (3)
threading (3)
random (3)
search (3)
fibonacci (3)
encryption (3)
joins (3)
hash (3)
queue (3)
asm (3)
design patterns (2)

next »

Random
Find longest run of a letter in a string[2007-05-29 04:24:53]   
Write a function that returns the longest run of a letter in a string. e.g. cccc in the string abccccdef.
linkAuthor:premTags: stringAnswer

yet another find-the-odd-ball out problem[2007-02-26 23:42:16]   
You are given 10 baskets. 9 of the baskets each have 10 balls weighing
10kg per ball, however one basket has 10 balls weighing 9kg each. All
the balls and baskets are identical in appearance. You are asked to
determine which basket contains the 9kg balls. You have a suitable
scale, but may only take a single measurement. No other measurements may
be taken (like trying to determine by hand). You may remove balls from
the baskets but may still only take one measurement. How do you do it?
linkAuthor:premTags: puzzle1 CommentAnswer

What are the various steps that a typical OS would do during context switching.[2007-02-26 23:42:21]   
What are the various steps that a typical OS would do during context switching.
linkAuthor:premTags: system | CS FundamentalsAnswer

Keys storage & access[2007-02-26 23:42:18]   
Given a set of KEY->VALUE pairs such that each KEY is unique, describe a method of storing these pairs on disk, and a method for accessing the corresponding VALUE given a KEY. Assume that RAM is fixed at 1gb and the set of pairs requires 40gb.

HINT: we are trying to minimize page-transfers
linkAuthor:premTags: system1 CommentAnswer

Virtual Memory[2007-02-26 23:42:19]   
Explain Virtual Memory.
linkAuthor:premTags: system | CS Fundamentals1 CommentAnswer

Disk interleaving[2007-02-26 23:42:19]   
what is disk interleaving? why is disk interleaving adopted?
linkAuthor:premTags: system | CS FundamentalsAnswer

What is network-byte order?[2007-02-26 23:42:21]   
What is network-byte order?
linkAuthor:premTags: system | networkingAnswer

Describe the file system layout in the UNIX OS.[2007-02-26 23:42:20]   
Describe the file system layout in the UNIX OS. Describe boot block, super block, inodes and data layout.
linkAuthor:premTags: system | CS FundamentalsAnswer

Disk algorithm[2007-02-26 23:42:18]   
Lets say you have a disk of size N with N blocks. Every block stores
part of a file. Every file starts from a single block. The block size is
not enough to store a file. Every block has a used/unused bit and a
pointer to the next block in the disk which will store the next part of
the file and so on. A block which stores the end of a file points to
null. Also a block whose unused bit is 0 doesnt point to anything and is
not pointed to by any block. Now u have an index of files with filename
as index and the value as the first block in which the file starts.Lets
says u somehow lose these indices and values. How will you find an
efficient algorithm to recreate this index structure with values. You
can use any filenames while creating the indices.(While solving one shld
think of cases where the file starts at block 4 which points to 1 then
to 2 and ends at 3)
linkAuthor:premTags: algorithms | systemAnswer

Disk spinning[2007-02-26 23:42:19]   
Imagine a disk spinning like a record player turn table. Half of the disk is black and the other is white. Assume you have an unlimited number of color sensors. How many sensors would you have to place around the disk to determine the direction the disk is spinning? Where would they be placed?
linkAuthor:premTags: systemAnswer

Blocks[2007-02-26 23:42:20]   
Lets say you have a disk of size N with N blocks. Every block stores part of a file. Every file starts from a single block. The block size is not enough to store a file. Every block has a used/unused bit and a pointer to the next block in the disk which will store the next part of the file and so on. A block which stores the end of a file points to null. Also a block whose unused bit is 0 doesnt point to anything and is not pointed to by any block. Now u have an index of files with filename as index and the value as the first block in which the file starts.Lets says u somehow lose these indices and values. How will you find an efficient algorithm to recreate this index structure with values. You can use any filenames while creating the indices. (While solving one shld think of cases where the file starts at block 4 which points to 1 then to 2 and ends at 3)
linkAuthor:premTags: algorithms | systemAnswer

Links vs copying a file[2007-02-26 23:42:21]   
What is the main advantage of creating links to a file instead of copies of the file?
linkAuthor:premTags: system | CS Fundamentals | unixAnswer


next »




Created by Premchand Jayamohan