[algogeeks] Re: Data Structure Q

2013-12-18 Thread Gudivaka Praveen
Can u pls show me the diagram representation of the implementation of Stack using 2 Queues -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to

[algogeeks] Code Rush - Online Programming Contest

2013-04-06 Thread Praveen Kumar
- 11:30 PM IST Ends: 07 Apr 2013, 11:30 PM IST Check out the contest timings in your timezone here? http://www.timeanddate.com/worldclock/fixedtime.html?msg=Code+Rushiso=20130407T2130p1=176ah=2 For more details, visit the contest page http://www.hackerearth.com/code-rush/ -- Cheers Praveen

[algogeeks] [Off topic] Code Rush - Online Programming Contest

2013-04-06 Thread Praveen Kumar
Praveen -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

Re: [algogeeks] MS Question

2013-01-20 Thread Praveen
-- -- Praveen Sonare +91-7838908235 --

Re: [algogeeks] fastest sequential access

2012-11-22 Thread Praveen Kumar
... -- -- -- Cheers Praveen --

Re: [algogeeks] Appropriate data structure

2012-07-17 Thread praveen raj
steps: 1) make max heapify and min heapify for first k days 2)for the next day... remove first element from max heapify and min heapify then add new element to existing max heapify and min heapify . 3) Then return max and min in O(1)from max heapify and min heapify . PRAVEEN RAJ DELHI

Re: [algogeeks] Switch doubt in C

2012-06-29 Thread Praveen
options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Praveen Sonare +91-7838908235 -- 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 from

Re: [algogeeks]

2012-06-29 Thread praveen raj
l value - address r value - content of variable(value) ex- x=2 x has value and address but 2 has only value cout++x++ I think this will result into l error . PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] Problem(algo+filesystem): Fetch last K -MB data from data stream

2012-06-12 Thread Praveen
constraint although you can use other temp files if it work. Please revert back if any clarification needed... Thanks Regards, Praveen -- 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

Re: [algogeeks] first Repeating character in a string

2012-06-08 Thread Praveen
Use the below function, that will return first repeated character of string or null; Note: blank space is also consider as character... you can add exception to avoid such case char firstRepeatChar(char *str) { int arr[256] = {0}; for(int i = 0; str[i] != '\0'; i++) { arr[str[i]] +=1;

Re: [algogeeks] Re: Algorithm page

2012-04-16 Thread Praveen Kumar
Here[0] is one of the post( http://marathoncode.blogspot.com.br/2012/03/alguns-truques-da-linguagem-c.html) by Wladimir in english [0]http://codewar.in/c-tricks-vectors-and-algorithm-in-stl/ -- Cheers -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] [Combinatorics] count possible number of binary search trees, given number of nodes

2012-02-11 Thread praveen raj
It will be very helpful if u could tell me for binary search tree and binary tree both... PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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

Re: [algogeeks] Re: Binary Search Tree Question

2012-02-11 Thread praveen raj
mirror of tree PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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 from this group, send email to algogeeks+unsubscr

Re: [algogeeks]

2012-02-10 Thread praveen raj
choose greedy algorithm... in in minimum spanning tree.. PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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 from this group

Re: [algogeeks] Re: MS Question -Reverse a Linked List in size of 2

2012-01-24 Thread praveen raj
Steps: 1)Reverse the list ... 2)Now do the swap two nodes... consecutively... PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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

Re: [algogeeks] Re: MS Q

2012-01-24 Thread praveen raj
Idea: 1)Take count =0; 2) make Outer loop ...and search for 1's . 3) Start ...searching for 1 consecutively... and make it ..0 untill all consecutive 1's becomes 0.. and then count++ 4) go to 1) untill all 1's finished.. count will give the total number of islands... PRAVEEN RAJ

Re: [algogeeks] anybody c output?

2012-01-24 Thread praveen raj
hello world must be o/p... but don't understand abt the o/p in ideone... PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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] Re: sort 2D array

2012-01-24 Thread praveen raj
This can be done... k way merge... c- number of columns r- number of rows In O(c*r*log(r)) PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

Re: [algogeeks] Re: MS Q

2012-01-24 Thread praveen raj
name it. PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING On Wed, Jan 25, 2012 at 12:45 AM, atul anand atul.87fri...@gmail.comwrote: @Praveen : i have doubt in your algo...it seem it may fail for some cases... On Tue, Jan 24, 2012 at 5:59 PM, praveen raj praveen0...@gmail.comwrote: Idea: 1

Re: [algogeeks] Re: Amazon ques

2012-01-22 Thread praveen raj
Answer is already given in group search it... PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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 from this group, send

Re: [algogeeks] suggest algo

2012-01-13 Thread praveen raj
run the randomized partition...and find (n-k)th smallest according to frequency.take k elements... below it...have most frequent elements PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Re: Longest sequence of numbers with atmost diff K

2012-01-02 Thread praveen raj
this is like a DP problem to me 1) build a 2 D array . 2) store If difference b/w any two number is = K then M[i,j]=1 else M[i,j]=0 3) Now find max size square (containing all ones) by using Dynamic Programming. PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message

Re: [algogeeks] Re: Generate all possible binary trees given in-order traversal

2011-12-30 Thread praveen raj
); } } PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com

Re: [algogeeks] Re: Generate all possible binary trees given in-order traversal

2011-12-30 Thread praveen raj
yes... right... i forget to remove this statement.. PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING On Fri, Dec 30, 2011 at 2:17 PM, Lucifer sourabhd2...@gmail.com wrote: @praveen I think what u are doing above is the following: Say, F(n) denotes the no. of binary trees that can be formed

Re: [algogeeks] Re: Find even length palindrome.

2011-12-30 Thread praveen raj
The Question is: whther there exist a even length pallindrome or not since for even ... the two consecutive character will be equal... so find two character which are equal.. consecutively.. PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message because you

Re: [algogeeks] Re: amazon ques

2011-12-29 Thread praveen raj
IT will grt help for me... if u all tell me.. mapstring,int m; m[topcoder]=2 My question is this: Is 2 is an key value??or index value of hash table...??... kindly explain how actual mapping is done... in hash table...plz... PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING On Tue, Dec 27

Re: [algogeeks] Frequency Sort Algo

2011-12-29 Thread praveen raj
the element row wise.. . PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- 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 from this group, send email to algogeeks+unsubscr

Re: [algogeeks] Re: Obstacle Avoidance

2011-12-29 Thread praveen raj
Procedure: 1.if out of boundary return 0; 2.If reach final point return 1. 3.if(next point has no obstacle then go for it.. recursively) PRAVEEN RAJ DELHI COLLEGE OF ENGINEERING -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Re: Frequency Sort Algo

2011-12-25 Thread praveen raj
Hashmapping O(n) On 25-Dec-2011 2:15 AM, sravanreddy001 sravanreddy...@gmail.com wrote: any better approach than O(N log N) time? maintain a heap of nodes value, count for each element, if already present increase the count. Else add the elements. Max-Heap -- fetch the node, print it

Re: [algogeeks] NUMBER OF MST ?

2011-12-03 Thread praveen raj
N!/2 On 03-Dec-2011 11:30 PM, Dipit Grover dipitgro...@gmail.com wrote: ^ we need to count each permutation and its reverse together as one possibility since both would result in identical mst. -- Dipit Grover B.Tech in Computer Science and Engineering - lllrd year IIT Roorkee, India

Re: [algogeeks] Finding Maximum subarray in a circle

2011-11-02 Thread praveen raj
, Praveen Raj DCE-IT 735993 praveen0...@gmail.com -- 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 from this group, send email to algogeeks+unsubscr

Re: [algogeeks] Re: Microsoft Question

2011-10-29 Thread praveen raj
in increasing order... .. so on popping the element... will pop the topmost element(with the highest priority value).. on pushing the element... push the element... with the priority value more than topmost priority value... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0

Re: [algogeeks] A logical Question

2011-10-29 Thread praveen raj
amount displaced by (boat +man + suitcase) = amount displaced by (boat+man) + amount displaced by suitcase therefore no change of level... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Thu, Sep 15, 2011 at 4:24 PM, hary rathor harry.rat...@gmail.com wrote

Re: [algogeeks] Re: Finding connection b/w 2 profiles

2011-10-29 Thread praveen raj
@jitesh rightly said... since there is no limit of depth... we can go for BFS.. we can reduce space by comparing A's and C's profile... whatever is common ... we can use it to find connection... between A and C With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com

Re: [algogeeks] pgm2

2011-10-29 Thread praveen raj
if length is even : then every element must occurs even times if length is odd : then every element must occurs even times except one element occurs odd... With regards, Praveen Raj DCE-IT 735993 praveen0...@gmail.com -- You received this message because you are subscribed to the Google

Re: [algogeeks] explain the output..!!

2011-10-29 Thread praveen raj
grt :) With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com -- 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 from this group, send email

Re: [algogeeks] Re: Exchanging bit values in a number

2011-10-29 Thread praveen raj
int func(int x) { int y=(1i)+(1j); int z=xy;// if after bitwise and ..we get power of 2 then ... we have to flip the bits.. if((z(z-1))==0) return(x^y); else return x; } With regards, Praveen Raj DCE-IT 735993 praveen0...@gmail.com -- You received

Re: [algogeeks] Re: Modified binary search

2011-10-28 Thread praveen raj
+1 Gene With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Wed, Sep 28, 2011 at 1:36 AM, Gene gene.ress...@gmail.com wrote: Indeed you must be given that all the array elements are unique or at least that there are no more than floor(n/2) repeats). Otherwise

Re: [algogeeks] Re: FACEBOOK ONLINE CODING ROUND

2011-10-27 Thread praveen raj
)... With regards, Praveen Raj DCE-IT 735993 praveen0...@gmail.com -- 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 from this group, send email to algogeeks

Re: [algogeeks] Re: FACEBOOK ONLINE CODING ROUND

2011-10-26 Thread praveen raj
() { func(7,127);//left for N0 and and right for K..chech for any other values getch(); return 0; } Tell me .. if u find any test cases failed...Thankx... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Wed, Oct 26, 2011 at 1:56 PM, praveen raj

Re: [algogeeks] Re: Amazon OS question

2011-10-26 Thread praveen raj
good question.. With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Tue, Sep 27, 2011 at 6:40 AM, Kunal Patil kp101...@gmail.com wrote: Nice question nice answer... :) On Tue, Sep 27, 2011 at 6:25 AM, UTKARSH SRIVASTAV usrivastav...@gmail.com wrote: what's

Re: [algogeeks] adobe question help

2011-10-25 Thread praveen raj
N=(N( (~0j) | (~(1i))) | (Mi) With regards, Praveen Raj DCE-IT 735993 praveen0...@gmail.com On Tue, Oct 25, 2011 at 11:46 AM, Bittu Sarkar bittu...@gmail.com wrote: N = (N | ((1(j-i+1)-1)i) (Mi); On 12 October 2011 01:22, prasad jondhale jondhale.pra...@gmail.comwrote: grt

Re: [algogeeks] Questions on Hashing ...Share ur ideas...

2011-10-25 Thread praveen raj
problem 4.. good question... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Tue, Oct 25, 2011 at 5:57 PM, kumar raja rajkumar.cs...@gmail.comwrote: Problem 1: Remove duplicate elements from an unsorted array of size N Problem 2: Find intersection of K unsorted

Re: [algogeeks] Amazon Onsite

2011-10-24 Thread praveen raj
I will choose the point where amount of fuel is maximum choose the shortest path from two direction (clockwise or anticlockwise).. With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Mon, Oct 24, 2011 at 4:36 PM, Aniket aniket...@gmail.com wrote: Suppose

Re: [algogeeks] K-best assignment problem

2011-10-24 Thread praveen raj
Its like a queen problem ...with row and column are not same.. With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Tue, Oct 18, 2011 at 12:06 AM, Don dondod...@gmail.com wrote: Given a cost matrix with N columns and M rows such that M=N, find the K lowest total cost

Re: [algogeeks] choosing numbers

2011-10-24 Thread praveen raj
) coutijk; } } } With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Mon, Oct 24, 2011 at 3:00 AM, Piyush Kapoor pkjee2...@gmail.com wrote: Suppose u choose ith element from the Kth set,then dp[K][Sum]=sum(from i=0 to number of elements in the Kth

Re: [algogeeks] Amazon Question - Find Pythagorean triplet in an unsorted array

2011-10-13 Thread praveen raj
N2 would me minimum On 13-Oct-2011 11:08 PM, ravindra patel ravindra.it...@gmail.com wrote: Hi, Another question I faced in Amazon F2F. Given an unsorted array of integers, find all triplets that satisfy x^2 + y^2 = z^2. For example if given array is - 1, 3, 7, 5, 4, 12, 13 The

Re: [algogeeks] citrix question

2011-10-08 Thread praveen raj
Kernel. On 08-Oct-2011 11:33 AM, raj kumar megamonste...@gmail.com wrote: * Which of the following restricts a process to the memory allocated to it * * *a. stack pointers b. memory allocation hardware c. kernel d. none of these what's the answer of this question -- You received this

Re: [algogeeks] citrix question

2011-10-08 Thread praveen raj
Plz put more question that has beem asked in citrix. On 08-Oct-2011 11:33 AM, raj kumar megamonste...@gmail.com wrote: * Which of the following restricts a process to the memory allocated to it * * *a. stack pointers b. memory allocation hardware c. kernel d. none of these what's the

[algogeeks] Help sourcebit !!!

2011-10-05 Thread praveen raj
Plz put the technical written paper pattern ...of sourcebit... and some sample papers...of what type of questions(level) would be asked... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: Number of Multiplications

2011-09-29 Thread praveen raj
Make two conditions for even and odd power. and use it to make solve higher power That could be solved in log b time . On 30-Sep-2011 4:12 AM, Dave dave_and_da...@juno.com wrote: @Don, Ankuj. I believe that Don's algorithm uses precisely floor{log_2(b)) + (the number of one bits in b) -

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread praveen raj
Take two array... one will take care of left products... and othr will take care of right product.. at any index left[i]=A[i-1]*left[i-1] starting from left and right[i]= A[i+1]*right[i+1] starting frm right…… -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: Infinite Array

2011-09-29 Thread praveen raj
@don we dnt hve ny info about arrangement... -- 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 from this group, send email to

Re: [algogeeks] Explain output

2011-09-29 Thread praveen raj
Ptr cannot be used to allocate block of memory .. void pointer use only to store address... -- 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 from this group, send

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread praveen raj
@nitin Plz explain how u have reached answer of question no. 4 and 6 On 19-Sep-2011 12:26 AM, Nitin Garg nitin.garg.i...@gmail.com wrote: Answer 3 - 100 Answer 6 - 103 Answer 4 - 194 total processes including the parent Answer 7 - 12 km south, 12 km east On Sun, Sep 18, 2011 at 11:53 PM,

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread praveen raj
: @Nitin: Answer to question 3 is 50. On Mon, Sep 19, 2011 at 11:44 AM, praveen raj praveen0...@gmail.com wrote: @nitin Plz explain how u have reached answer of question no. 4 and 6 On 19-Sep-2011 12:26 AM, Nitin Garg nitin.garg.i...@gmail.com wrote: Answer 3 - 100 Answer 6 - 103

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread praveen raj
, 2011 at 2:47 PM, praveen raj praveen0...@gmail.com wrote: For question 2 see ashima link. On 19-Sep-2011 1:43 PM, Nitin Garg nitin.garg.i...@gmail.com wrote: Can someone tell answers to question 2 and 5 with explanation?? On Mon, Sep 19, 2011 at 1:40 PM, Nitin Garg nitin.garg.i

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread praveen raj
to elimination of any other player. So, min 2 matches for every player who is to be eliminated, hence 100. On Mon, Sep 19, 2011 at 11:54 AM, Bhanu Chowdary bhanuchowd...@gmail.com wrote: @Nitin: Answer to question 3 is 50. On Mon, Sep 19, 2011 at 11:44 AM, praveen raj praveen0...@gmail.com

Re: [algogeeks] C++ Query

2011-09-19 Thread praveen raj
Yes u r saying correct . On 19-Sep-2011 6:39 PM, teja bala pawanjalsa.t...@gmail.com wrote: Why do we pass a reference for copy constructors? If it does shallow copy for pass by value (user defined object), how will it do the deep copy? Ans:- if we don't pass the reference, every time a

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread praveen raj
Use trie. On 19-Sep-2011 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote: given an array of characters without spaces and a dictionary.All valid dictionary words must be found and printed. i/p : BANKERKCATXYWOMAN. o/p: BANK BANKER CAT WOMAN MAN (the only function you could use for

Re: [algogeeks] Plz explain the output..........

2011-09-17 Thread praveen raj
This will show syntax error due to x==9 and otherwise since memory address given at the declarAtion there fore x value will. Change at every assignment , but i m not sure printf will give an error or not . Plz reply. On 17-Sep-2011 1:13 AM, Anshul AGARWAL anshul.agarwa...@gmail.com wrote:

Re: [algogeeks] Implementing a grep

2011-09-10 Thread praveen raj
it... but we have to care of freeing trie ... list after searching for the given substring. KMP approach : would be otherwise... better With regards, Praveen Raj DCE-IT 4th yr -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] What would be the ans.

2011-09-10 Thread praveen raj
Can anyone explain me approach. how u r calculating..it... With regards, Praveen Raj DCE-IT 3rd yr -- 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 from

Re: [algogeeks] Re: Kth largest element

2011-09-10 Thread praveen raj
With regards, Praveen Raj DCE-IT 3rd yr -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com

Re: [algogeeks] Re: What would be the ans.

2011-09-10 Thread praveen raj
@brijesh.. +1.. but can we think of area approach...I m just thinking...??do google.. may find our answer With regards, Praveen Raj DCE-IT 3rd yr -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

Re: [algogeeks] cormen question

2011-09-10 Thread praveen raj
it with example... running time...O(nlogn)... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com -- 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] Re: microsoft interview

2011-09-10 Thread praveen raj
whts the question?? With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Fri, Sep 9, 2011 at 12:17 PM, Amit Gupta amit30ma...@gmail.com wrote: Guys, why don't we do something like this : 1. If (arrayHasBeenTraversed, Goto 4). Else, Traverse the 2-D array

Re: [algogeeks]

2011-09-10 Thread praveen raj
; . if(character input=='t') bptr=tr; else bptr=ci; bptr-display(); } With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

Re: [algogeeks] Re: Write a program

2011-09-10 Thread praveen raj
@brijesh ..+1 but character range.. from 0 to 255... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Sat, Sep 10, 2011 at 7:03 PM, Brijesh brijeshupadhyay...@gmail.comwrote: If you are talking about character array then it can be done in space O(128)=constant

Re: [algogeeks] semaphores

2011-09-10 Thread praveen raj
@neha ..+1 With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com -- 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 from this group, send email

[algogeeks] How can we find second largest element in an array... in O(n+logn-2)... give me proof.....

2011-09-10 Thread praveen raj
How can we find second largest element in an array... in O(n +logn-2)... give me proof. -- 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 from this group, send

Re: [algogeeks] How can we find second largest element in an array... in O(n+logn-2)... give me proof.....

2011-09-10 Thread praveen raj
@gaurav... how?? With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Sat, Sep 10, 2011 at 7:49 PM, Gaurav Menghani gaurav.mengh...@gmail.comwrote: It can be done trivially in O(n). On Sat, Sep 10, 2011 at 10:18 AM, praveen raj praveen0...@gmail.com wrote: How

Re: [algogeeks] Circular Left shift

2011-09-10 Thread praveen raj
@all... arr=[3,6,7,1,2,7,8,9] suppose: k=3 rotated three times.. first step... reverse.. first k(3) elements... [7,6,3,1,2,7,8,9] second step...reverse last (n-k) elements... [7,6,3,9,8,7,2,1] third step reverse the whole array[1,2,7,8,9,3,6,7] thanx, With regards, Praveen Raj DCE-IT 3rd

Re: [algogeeks] Circular Left shift

2011-09-10 Thread praveen raj
@amrit... +1 .. With regards, Praveen Raj DCE-IT 3rd yr -- 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 from this group, send email to algogeeks+unsubscr

Re: [algogeeks] Circular Left shift

2011-09-10 Thread praveen raj
Whatever changes have been made in array in first step 1 will be continue to 2nd step(reverse the n-k elements) With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Sun, Sep 11, 2011 at 9:51 AM, bharatkumar bagana bagana.bharatku...@gmail.com wrote: @praveen

Re: [algogeeks] Re: Write a program

2011-09-10 Thread praveen raj
Use of binary tree.. which has node(value,count) count -number of elements having having element = value... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Sun, Sep 11, 2011 at 10:32 AM, Ishan Aggarwal ishan.aggarwal.1...@gmail.com wrote: What would

Re: [algogeeks] future first????

2011-09-09 Thread praveen raj
Full of Aptitude. they check the speed and accuracy... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Thu, Sep 8, 2011 at 3:33 AM, htross htb...@gmail.com wrote: future first is coming to our college.what kind of questions will be asked in first round

Re: [algogeeks] Kth largest element

2011-09-08 Thread praveen raj
Use the Randomized partition approach of quicksort to find the kth largest element in the array. With regards, Praveen Raj -- 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

Re: [algogeeks] Re: whats d problem wid using gets?

2011-09-08 Thread praveen raj
char str[MAXLINE]; fp=fopen(ABC.txt,r); syntax: fgets(str,MAXLINE,fp); With regards, Praveen Raj -- 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 from this group

Re: [algogeeks] Re: whats d problem wid using gets?

2011-09-08 Thread praveen raj
@sandeep...dont understand... plz give an example... With regards, Praveen Raj -- 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 from this group, send email

Re: [algogeeks] Kth largest element

2011-09-08 Thread praveen raj
@brijesh...Tht would...be... O(klogn) -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com.

Re: [algogeeks] sorting

2011-09-08 Thread praveen raj
Merge sort Quicksort--number of comparisons and exchanges lesser than heapsort...if worst case not occurs... -- 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 from

Re: [algogeeks] Re: MICROSOFT

2011-09-08 Thread praveen raj
Through heapsort k times... O(klogn) . With regards, Praveen Raj DCE-IT praveen0...@gmail.com -- 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 from

Re: [algogeeks] Kth largest element

2011-09-08 Thread praveen raj
. therefoe... O((n-k)logn)... With regards, Praveen Raj DCE-IT 3rd yr -- 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 from this group, send email to algogeeks

Re: [algogeeks] sorting

2011-09-08 Thread praveen raj
for checking whther given array sorted or not... bubble sort or insertion sort... takes O(n).. time... With regards, Praveen Raj DCE-IT 3rd yr 735993 praveen0...@gmail.com On Thu, Sep 8, 2011 at 11:32 PM, aayush jain ajain...@gmail.com wrote: thanx @piyush -- You received

Re: [algogeeks] sort the array

2011-06-21 Thread Praveen
?hl=en. -- B. Praveen -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options

Re: [algogeeks] Test Cases

2011-05-10 Thread Praveen Kumar
cases would be: 1. division by 0 raises an appropriate Exception 2. dividing 0 by any number should result in 0 3. dividing any number by 1 should give the same number 4. a = b*q + r i.e a/b should give q On Tue, May 10, 2011 at 7:52 PM, Carl Barton odysseus.ulys...@gmail.comwrote: Don't really

[algogeeks] Implementing a BTree

2011-04-21 Thread Praveen Kumar
Hi, I have to implement BTree and B+ Tree as part of a project. But, I am finding it difficult to do that. Can anyone share his/her code if one has implemented it or share resources where I can find the implementation? Praveen -- You received this message because you are subscribed

Re: [algogeeks] Sources~websites and materials~ for the algorithms.

2011-04-17 Thread Praveen Kumar
www.codechef.com www.spoj.ol On Sun, Apr 17, 2011 at 11:00 PM, sravanreddy001 sravanreddy...@gmail.comwrote: Hi, Can anyone share the places or locations for the algorithmic challenges, puzzles etc. here are few I know. thealgorithmist.com (google it) -- Its not active now... but has

Re: [algogeeks] Study in the heart of Europe

2011-04-12 Thread Praveen Kumar
The owner of this group, please grant me the rights to ban such people and that sexy bitch. Praveen On Tue, Apr 12, 2011 at 9:55 PM, Geo News 22au...@gmail.com wrote: *Nursing School Abroad Island Paradise. New Facilities. Proven School. Quality program. http://bit.ly/degreeZ Two-year

Re: [algogeeks] SEXY HOT PHOTOS

2011-04-11 Thread Praveen Kumar
Will the group owner or manager or moderator please ban this sexy bitch? On Mon, Apr 11, 2011 at 3:03 PM, SUNITHA BUSETTY sunitha.buse...@gmail.comwrote: hot lipkiss http://hotactressstoyou.blogspot.com/2011/04/lipkiss-2.html lipkiss in without dress

Re: [algogeeks] [brain teaser ] 1april

2011-04-01 Thread Praveen
://groups.google.com/group/algogeeks?hl=en. -- B. Praveen -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com

Re: [algogeeks] Output of the code

2011-03-28 Thread Praveen Kumar
Here is the correct program : #includeiostream using namespace std; int main() { while(true) { coutIndia will win the World Cup 2010endl; } return 0; } On Mon, Mar 28, 2011 at 8:42 PM, Praveen Kumar praveen97...@gmail.comwrote: true is a keyword

Re: [algogeeks] [brain teaser ] 14march

2011-03-14 Thread Praveen
to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- B. Praveen -- You received this message because you are subscribed

Re: [algogeeks] give answer

2011-03-10 Thread Praveen
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- B. Praveen -- 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

Re: [algogeeks] UVa - Gold Coins

2011-02-16 Thread Praveen
Hi All total number of coins = 1+(2+2)+(3+3+3)+(4+4+4+4)+(N+N+.N times) = 1+(2*2)+(3*3)+4*4+...+(N*N) = (N*(N+1)*(2N+1))/6 Please do correct me if i am wrong Regards Praveen On Thu, Feb 17, 2011 at 6:26

Re: [algogeeks] Re: 1s and 0s

2010-12-25 Thread Praveen Baskar
to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- B. Praveen -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group

Re: [algogeeks] BST Question

2010-10-24 Thread Praveen Baskar
oh ya thanks now i got it On Sun, Oct 24, 2010 at 9:54 AM, preetika tyagi preetikaty...@gmail.comwrote: @Praveen- In this case, we will not ignore the right subtree of the root (-10, which is less than zero) while traversing the tree. On Sat, Oct 23, 2010 at 9:06 PM, Praveen Baskar

Re: [algogeeks] BST Question

2010-10-23 Thread Praveen Baskar
nishaant...@gmail.com wrote: @Praveenit is not possible..in a BST *all the nodes* on the right subtree are greater than the node :) On Sat, Oct 16, 2010 at 3:26 PM, Praveen Baskar praveen200...@gmail.comwrote: @nishaanth: wat if the left child of the right node has a negative value

Re: [algogeeks] BST Question

2010-10-16 Thread Praveen Baskar
this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- By B. Praveen -- You received this message because you are subscribed to the Google Groups

  1   2   >