1. how do u find 10 most repeating words on a large file containing
words
in most efficient way
2.
Given a text file, implement a solution to find out if a pattern
similar to wild cards can be detected.
fort example find if a*b*cd*, or *win or *def* exists in the text.
--
You received this
It is like finding the in order successor.
See it here (using parent pointer)
http://tech-queries.blogspot.com/2010/04/inorder-succesor-in-binary-tree.html
w/0 Parent pointer:
http://tech-queries.blogspot.com/2010/04/inorder-succesor-in-binary-tree-wo.html
Regards,
Akash Agrawal
1.
Below is a solution of first problem -
int SuccessorOfANodeInBST(Node N, int givenNumber)
{
if(N-rightChild != NULL)
return (int) N-rightchild-data;
int iNumberFound = 0;
Node K = ParentOf(N);
Node J = ParentOf(K);
while(1)
{
if(K == J-leftChild)
{
On 09-Dec-2010, at 1:28 PM, rajan goswami wrote:
1.
Below is a solution of first problem -
int SuccessorOfANodeInBST(Node N, int givenNumber)
{
if(N-rightChild != NULL)
return (int) N-rightchild-data;
Why this? The right child might not be the next immediate higher
Code for question no.--2
#includestdio.h
#includeconio.h
#includetime.h
struct test{
clock_t endwait;
void (*print_ptr)();
};
void print()
{printf(\nHello World\n);}
void wait ( int seconds )
{
struct test *g=(struct test *)malloc(sizeof(struct test));
g-endwait= clock
explain the 1st one again
On Thu, Dec 9, 2010 at 11:16 AM, Anand anandut2...@gmail.com wrote:
One of my friend recently had a telephonic interview and he got two
question to program.
1. Given a binary search tree. Write a function which takes any given node
from the binary tree and a