[algogeeks] need to store integer values of higher range than long long

2012-08-02 Thread mike miller
hi, 3 8 12 17 22 28 35 44 56this is the series1 5 4 5 5 6 7 9 12 this is the consecutive term difference series2 -1 1 0 1 1 2 3 this is further the consecutive term difference series3 the series3 is forming a fibonacci series .. baesd on this you have to

[algogeeks] run length decoding

2012-08-02 Thread sumit
*below is program for for run length decoding. it works well when i/p is of type a4b5 (o/p=b) etc but when numbers are of 2 digit then it fails. * [code] #include iostream.h

Re: [algogeeks] directi paper pattern

2012-08-02 Thread Abhishek Sharma
please mail me too. Directi is coming for written test on this 8th in our college. Thanks in advance.. On Tue, Jul 31, 2012 at 11:48 PM, amit singh amitsingh...@gmail.com wrote: hi shaukat Ali ,it will be really kind if you can forward me that paper of directi my ID:amitsingh...@gmail.com

[algogeeks] Re: directi paper pattern

2012-08-02 Thread piyush dureja
plz mail it to me too... piyushdur...@gmail.com On Tuesday, July 31, 2012 7:37:03 PM UTC+5:30, deepikaanand wrote: can anyone tell me the pattern (selection procedure )followed by directi this year -- You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] Microsoft first round interview question.

2012-08-02 Thread sahil gupta
There is doubly link list and each node is having another pointer which is points to another doubly link list or points to null. You need make it straight doubly link list. Provide the efficient code. Sahil Gupta -- You received this message because you are subscribed to the Google Groups

[algogeeks] BFS

2012-08-02 Thread harsha
hello all, i was recently trying to solve a BFS problem where each node is represented by a different arrangement of elements in an array but am unable to come with a data structure to keep track of the visited nodes. generally nodes are different strings so we can just use map and set visited

Re: [algogeeks] directi paper pattern

2012-08-02 Thread kaushal gada
hey can u plz send it to me also thanx in advance :) -- Kaushal Gada Student BITS-Pilani K.K.Birla Goa Campus. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe

Re: [algogeeks] Removing space inplace

2012-08-02 Thread atul pandey
Geeks just look at this...correct me if i am wrong...!! int main() { char s[] = how are youfriends; int i=0; while(s[i] != '\0') { if(s[i] == ' ' s[i+1]==' ') { s[i+1] = '\b'; i++; } else if(s[i]== ' ') s[i]='\a'; i++; } printf(%s\n, s); } On Wed, Aug 1, 2012 at 5:01 PM,

Re: [algogeeks] Microsoft first round interview question.

2012-08-02 Thread Amit Basak
Does each node in the list have three pointers? What do you mean by straight doubly link list? Thanks, Amit On Wed, Aug 1, 2012 at 7:25 PM, sahil gupta sahilgupta...@gmail.com wrote: There is doubly link list and each node is having another pointer which is points to another doubly link

Re: [algogeeks] Microsoft first round interview question.

2012-08-02 Thread Navin Kumar
@sahil: Please elaborate your question. I didn't understand your question. what is straight doubly linked list?? How many pointers each node have?? On Thu, Aug 2, 2012 at 4:26 PM, Amit Basak abas...@gmail.com wrote: Does each node in the list have three pointers? What do you mean by straight

Re: [algogeeks] Re: Microsoft online questions : DLL to bst??

2012-08-02 Thread Umer Farooq
A LinkedList is by itself is a BST such that one child node of each node is null. Do we need a simple BST or height balanced BST? On Tue, Jul 31, 2012 at 2:39 PM, Ashish Goel ashg...@gmail.com wrote: how would you do convert sorted doubly linked list to bst using same nodes as in DLL Best

Re: [algogeeks] directi paper pattern

2012-08-02 Thread saurabh singh
Please stop this idiocity of *me too,me too * You can send personal mails to the author,why spam the group? No More Posts on this thread. Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com -- You received this message because you are subscribed to the Google

[algogeeks] Java Design Question..

2012-08-02 Thread teja bala
I had a java class(acts as a database class) which got a method which returns the respective object of the class based on given data(instance variable) .. eg: given customer id and 3 classes clerk,manager,salesperson like that .. method should return the instance associated with the customer id..

Re: [algogeeks] Java Design Question..

2012-08-02 Thread Prem Krishna Chettri
One Line Answer.. Check Factory Design Pattern. On Thu, Aug 2, 2012 at 10:13 PM, teja bala pawanjalsa.t...@gmail.comwrote: I had a java class(acts as a database class) which got a method which returns the respective object of the class based on given data(instance variable) .. eg: given

Re: [algogeeks] Re: Microsoft online questions : DLL to bst??

2012-08-02 Thread Ashish Goel
Ishan, i am assuming that the list to BST should give a inorder traversal, and the logic of yours does not seem to give a right solution. try two different trees with 7 nodes, convert into LL and then back to BST, the answer is not same as the trees that we start with. Best Regards Ashish Goel

Re: [algogeeks] Re: Microsoft online questions : DLL to bst??

2012-08-02 Thread Ashish Goel
can you give the link within geeksforgeeks please Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Jul 31, 2012 at 4:13 PM, a g ag20071...@gmail.com wrote: check on geeksforgeeks.org On Tue, Jul 31, 2012 at 3:09 PM, Ashish Goel

Re: [algogeeks] Microsoft first round interview question.

2012-08-02 Thread Ashish Goel
lets call the additional pointer as child. find the tail and keep attaching to tail if there is a child... struct node * makeDLL(struct node *pDLL) { if (!pDLL) return pDLL; struct node *pTail = pDLL; while (pTail-next) pTail = pTail-next; struct node *pCurr = pDLL; while (pCurr) {