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
How can I return multiple values from a function?
[
2007-02-26 23:42:21
]   
How can I return multiple values from a function?
link
Author
:
prem
Tags
:
coding
|
c++
Answer
Histogram
[
2007-02-26 23:42:19
]   
You, a designer want to measure disk traffic i.e. get a histogram showing the relative frequency of I/O/second for each disk block. The buffer pool has b buffers and uses LRU replacement policy. The disk block size and buffer pool block sizes are the same. You are given a routine int lru_block_in_position (int i) which returns the block_id of the block in the i-th position in the list of blocks managed by LRU. Assume position 0 is the hottest. You can repeatedly call this routine. How would you get the histogram you desire?
link
Author
:
prem
Tags
:
system
Answer
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.
link
Author
:
prem
Tags
:
algorithms
|
binarytrees
|
tree
|
bst
|
traversal
4 Comments
Answer
Level-order traversal
[
2007-02-26 23:42:17
]   
Write a c code to do levelorder traversal of a binary tree
link
Author
:
prem
Tags
:
algorithms
|
binarytrees
|
tree
|
traversal
1 Comment
Answer
Depth-first graph traversal
[
2007-02-26 23:42:18
]   
Describe the algorithm for a depth-first graph traversal.
link
Author
:
prem
Tags
:
algorithms
|
tree
|
traversal
|
graph
Answer
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
link
Author
:
prem
Tags
:
algorithms
|
binarytrees
|
tree
|
traversal
4 Comments
Answer
Post-order traversal
[
2007-02-26 23:42:17
]   
Write a c code (both recursive & non recursive) to do postorder
traversal of a binary tree
link
Author
:
prem
Tags
:
algorithms
|
binarytrees
|
tree
|
traversal
Answer
Find lowest value in BST gt than a certain value
[
2007-02-26 23:42:17
]   
Find the lowest valued node in a Binary Search Tree (BST) greater than
or equal to a a certain value.
link
Author
:
prem
Tags
:
algorithms
|
binarytrees
|
tree
|
bst
|
traversal
Answer
Created by
Premchand Jayamohan