Puzzle Corner
Sign In
Home
Feedback
Blog
Resources
About
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)
Random
Tractor brain teaser
[
2007-05-27 21:25:22
]   
There are 3 societies a, b, and c. A lent tractors to B and C as many as they had. After some time B gave as many tractors to A and C as many as they have. After sometime c did the same thing. At the end of this transaction each one of them had 24. Find the tractors each originally had.
link
Author
:
prem
1 Comment
Answer
Pebbles
[
2007-02-26 23:42:20
]   
You are given an array ARR of size 2n + 1 (which are numbered from -n to 0 to
+n ). ARR[0] contains 2n + 1 pebbles. You need to distribute the pebbles
throughout the array such that each element in the array contains exactly 1
pebble. However, you have just one operation to move the pebbles - f(i).
On applying this function on the 'i' th postion [ where 'i' ranges from -n to
0 to +n ], one of the pebble moves from 'i' to 'i-1' and another pebble moves
from 'i' to 'i+1'. Such an operation f(i) can be performed on position 'i',
if ARR[i] has atleast 2 pebbles in it. Write an optimal algo to solve this problem
link
Author
:
prem
Tags
:
puzzle
|
coding
Answer
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?
link
Author
:
prem
Tags
:
system
|
CS Fundamentals
|
unix
Answer
Created by
Premchand Jayamohan