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
Random number generator[2007-02-26 23:42:18]   
Design a random number generator such that it selects ‘m’ random numbers
from an unsorted array of ‘n’ elements, where each element has equal
probability of being picked. A number picked cannot be chosen again.
linkAuthor:premTags: algorithms | randomAnswer

Write the output of the following program[2007-02-26 23:42:21]   
Write the output of the following program
#include

#define ABC 20
#define XYZ 10
#define XXX ABC - XYZ

void main()
{
int a;

a = XXX * 10;

printf("%d ", a);
}
linkAuthor:premTags: c++Answer

Tree inversion[2007-02-26 23:42:18]   
Given a binary tree with the following constraints:
a) A node has either both a left and right child OR no children
b) The right child of a node is either a leaf or NULL

write code to invert this tree. HINT: Draw this out
linkAuthor:premTags: coding | binarytrees | tree2 CommentsAnswer

Reproduce tree, given the preorder & inorder traversals[2007-09-05 21:10:15]   
Given a preorder and inorder traversal of a binary tree, can you reproduce the tree? if yes, then write a function using C/C++ that builds the tree and returns the root node of the tree.
linkAuthor:premTags: algorithms | coding | c++ | binarytrees | tree2 CommentsAnswer

Compare 2 binary trees[2007-02-26 23:42:18]   
Given two binary trees, find out if they are similar or not.
linkAuthor:premTags: algorithms | coding | binarytrees | tree2 CommentsAnswer

Find lowest common ancestor in BST[2007-02-26 23:42:17]   
Given 2 nodes in a BST, give an approach to find the lowest common
ancestor. Code it.
linkAuthor:premTags: algorithms | binarytrees | tree | bst | traversal4 CommentsAnswer

Traverse leaf nodes of the binary tree[2007-02-26 23:42:17]   
Write code to traverse leaf nodes of the binary tree
linkAuthor:premTags: algorithms | binarytrees | tree2 CommentsAnswer

Level-order traversal[2007-02-26 23:42:17]   
Write a c code to do levelorder traversal of a binary tree
linkAuthor:premTags: algorithms | binarytrees | tree | traversal1 CommentAnswer

Binary tree subsets[2007-02-26 23:42:18]   
Given a big tree and a small tree, give an algo to find if the small tree is a subset of the big tree
linkAuthor:premTags: algorithms | coding | binarytrees | tree2 CommentsAnswer

Depth-first graph traversal[2007-02-26 23:42:18]   
Describe the algorithm for a depth-first graph traversal.
linkAuthor:premTags: algorithms | tree | traversal | graphAnswer

In-order traversal[2007-02-26 23:42:17]   
Write a c code (both recursive & non recursive) to do inorder traversal
of a binary tree
linkAuthor:premTags: algorithms | binarytrees | tree | traversal4 CommentsAnswer

Find node in tree[2007-02-26 23:42:17]   
Given a tree such that each node has a child and sibling, find a node in
the tree.
Prioritize the search by level (ie., check all siblings before
children). Hint: use a queue
linkAuthor:premTags: algorithms | coding | binarytrees | tree | queue1 CommentAnswer


next »




Created by Premchand Jayamohan