Re: [algogeeks] C output

2012-10-06 Thread Rathish Kannan
For string, C appends '\0' internally. hence sizeof(str) returned the value 3. str1 is char array with two character. hence sizeof(str1) returned the value 2. -- RK :) On Sat, Oct 6, 2012 at 5:53 PM, rahul sharma rahul23111...@gmail.comwrote: char str[]=ab; char str1[]={'a','b'};

Re: [algogeeks] need help??

2012-09-23 Thread b.raj kannan
any body know about juniper networks internship written test pattern.. please help me. -- 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] Number of arrangements

2012-09-06 Thread Rathish Kannan
120 arrangements... -- RK :) On Thu, Sep 6, 2012 at 6:00 PM, Navin Kumar algorithm.i...@gmail.comwrote: @tendua: answer would be 6C3. Read about combination definition. On Thu, Sep 6, 2012 at 5:05 PM, atul anand atul.87fri...@gmail.comwrote: question says *3 alphabets with no data

Re: [algogeeks] first Repeating character in a string

2012-06-08 Thread Rathish Kannan
In a string try to loop through all character and count the occurances (incrementing by 1 whenever that character occurs)... store it in hash (initialize the hash to 0)... when the count of any char equals 2 break from the loop that char is first repeating char. -- RK :) On Fri, Jun 8, 2012 at

Re: [algogeeks] Datastructure and algorithms book

2012-06-05 Thread Rathish Kannan
http://books.google.co.in/books/about/Introduction_To_Algorithms.html?id=NLngYyWFl_YC -- RK :) On Tue, Jun 5, 2012 at 12:32 PM, arun prakash arunslb...@gmail.com wrote: Can anyone pls mail me good datastrucutre and algo books..or any link to download those books..thanks in advance --

Re: [algogeeks] how to solve

2012-04-09 Thread bharath kannan
I dont know if it can be solved in O(n). But O(nlogn) can be done using BIT. Refer topcoder tutorial for Binary indexed trees. On Mon, Apr 9, 2012 at 10:56 AM, tarun chabarwal admin20...@gmail.comwrote: how should i approach this problem https://www.spoj.pl/problems/DCEPC206/ can it be

Re: [algogeeks] Google Interview Question

2011-10-01 Thread Rathish Kannan
questions. Thanks Regards, Rathish Kannan -- 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] Google Interview Question

2011-10-01 Thread Rathish Kannan
apply through google careers site... -- RK :) On Sat, Oct 1, 2011 at 2:02 PM, Deepak Garg deepakgarg...@gmail.com wrote: hey,,,what is the process of attending google offcampus process. kindly let us know.. On Sat, Oct 1, 2011 at 1:52 PM, Rathish Kannan rathishkan...@gmail.comwrote

[algogeeks] Re: Anyone have The google resume book

2011-08-24 Thread RAJESH KANNAN S
Hi, http://dw3.convertfiles.com/files/0340683001314208083/0470927623.pdf the book is available in this link. On Jun 26, 10:20 pm, Swathi chukka.swa...@gmail.com wrote: -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

Re: [algogeeks] Reverse a List with Recursion

2011-07-17 Thread bharath kannan
node * reverse(node *head) { if(head-next) { node * temp=reverse(head-next); head-next-next=head; head-next=NULL; return temp; } return head; } On Sun, Jul 17, 2011 at 4:57 PM, Piyush Sinha ecstasy.piy...@gmail.comwrote: *node *reverse(node

Re: [algogeeks] [brain teaser ] Life Or Death 3 june

2011-06-03 Thread kannan s
yeah..sure bhavana's solution must be very best solution..but her calculation on probability is wrong ..it must .747 given by naveen.. On 6/3/11, deepak jakhar jakhar.deep...@gmail.com wrote: what r u discussing guys ? the ans. was clear in very first post by bhavana . @balaji dude why can't

Re: [algogeeks] SPOJ problem-BRCKTS

2011-03-26 Thread bharath kannan
i already mentioned the link where i got this approach.. //from spoj forum I have tried this problem with the following approach:- 1. any expression can be expressed as ))...)+a_correct_expression+((...( 2.at each node i am storing 1.no_of ')' at start and 2.no_of '(' at end of expression that

Re: [algogeeks] Re: SPOJ problem-BRCKTS

2011-03-23 Thread bharath kannan
i found this good.. http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=lowestCommonAncestor On Mon, Mar 21, 2011 at 6:02 PM, Anurag atri anu.anurag@gmail.comwrote: yes , please suggest a nice tutorial for segment trees .. On Mon, Mar 21, 2011 at 5:48 PM, cegprakash

Re: [algogeeks] Re: SPOJ problem-BRCKTS

2011-03-23 Thread bharath kannan
but..i read this oly after my senior taught me segment trees.. On Wed, Mar 23, 2011 at 4:43 PM, bharath kannan bharathgo...@gmail.comwrote: i found this good.. http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=lowestCommonAncestor On Mon, Mar 21, 2011 at 6:02 PM, Anurag atri

Re: [algogeeks] SPOJ NUMGUESS

2011-03-23 Thread bharath kannan
I guess you solve it using binary search.. On Wed, Mar 23, 2011 at 6:48 PM, Vishnutej mylavarapu.vishnu...@gmail.comwrote: Hello everyone, Im unable to understand the NUMGUESS problem in SPOJ.Can some one explain what the problem is about? Thanks in advance. -Vishnutej.Mylavarapu --

Re: [algogeeks] SPOJ problem-BRCKTS

2011-03-20 Thread bharath kannan
, 2011 at 10:40 AM, bharath kannan bharathgo...@gmail.comwrote: i thot tat i had some mistake in my code and typed it all over again.. finally i noticed this :) On Sat, Mar 19, 2011 at 12:12 AM, Kunal Patil kp101...@gmail.com wrote: Hey.. I also got into same trouble today... I submitted

Re: [algogeeks] Re: SPOJ problem-BRCKTS

2011-03-19 Thread bharath kannan
http://www.spoj.pl/forum/viewtopic.php?f=3t=5240p=20667hilit=BRCKTS#p20667 if u know d basics of segment tree..then this thread will help for solving this prob :) On Sun, Mar 20, 2011 at 2:11 AM, murthy.krishn...@gmail.com murthy.krishn...@gmail.com wrote: can any 1 explain why we have 2 use

Re: [algogeeks] SPOJ problem-BRCKTS

2011-03-19 Thread bharath kannan
i thot tat i had some mistake in my code and typed it all over again.. finally i noticed this :) On Sat, Mar 19, 2011 at 12:12 AM, Kunal Patil kp101...@gmail.com wrote: Hey.. I also got into same trouble today... I submitted it 6 times..then got bored and de moralised cause i cudnt find

Re: [algogeeks] SPOJ problem-BRCKTS

2011-03-17 Thread bharath kannan
sorry guyz... Had to print YES n NO.. i printed as Yes n No... Got ac.. Sorry for the trouble.. On Wed, Mar 16, 2011 at 10:24 PM, Bharath 2009503507 CSE bharathgo...@gmail.com wrote: i am new to segment trees..i tried this problem in spoj.. http://www.spoj.pl/problems/BRCKTS am getting WA..

Re: [algogeeks] please help..

2011-02-24 Thread bharath kannan
a small modification in normal knapsack algo ll do :) On Thu, Feb 24, 2011 at 4:06 PM, Akshata Sharma akshatasharm...@gmail.comwrote: http://www.spoj.pl/problems/PIGBANK/ can anyone give me an idea how to solve this problem...?? I dont think the knapsack algo would be of help here as here we

Re: [algogeeks] help

2010-12-16 Thread bharath kannan
machi use this.. Define *m*[*i*,*w*] to be the maximum value that can be attained with weight less than or equal to *w* using items up to *i*. We can define *m*[*i*,*w*] recursively as follows: - [image: m[0,\,w]=0] - [image: m[i,\,0]=0] - [image: m[i,\,w]=m[i-1,\,w]] if [image:

Re: [algogeeks] coins

2010-12-15 Thread bharath kannan
refer topcoder tutorials..dp On Wed, Dec 15, 2010 at 12:12 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: how do we find the complexity of DP program ? i know it cn be done using DP states , but the gien complexity is n^2 . i am not sure how to compare that On Tue, Dec 14, 2010 at

Re: [algogeeks] Re: FINDSR in spoj

2010-12-06 Thread bharath kannan
I tried solving that prob..here's my code #includeiostream #includestring using namespace std; main() { string s; cins; while(1) { if(s.size()==1 s[0]=='*') break; int length=1,curr=0,start=0,count=1; for(int i=1;is.size();i++) { if(s[i]!=s[curr]

Re: [algogeeks] missing 2 nums in an array

2010-10-11 Thread bharath kannan
sum of n elements from 1=n(n+1)/2 product from 1 to n=n! calculate dis.. sum=calculated sum-orig sum prod=calculated prod-orig prod with dis form quadratic eq and solve... hope this works... On Tue, Oct 12, 2010 at 12:29 AM, Asquare anshika.sp...@gmail.com wrote: Given an array of size n. It

[algogeeks] Online Math Coding Contest

2010-01-05 Thread kannan venkat
Hi , we gladly invite you to take part in Athena - the Online Math Coding Contest of Kurukshetra 2010 , the International Techo-Management Fest organised by College Of Engineering Guindy , India organised under the patronage of UNESCO . Here's your chance to lock horns against the best minds

[algogeeks] Re: Array Repeated Element O(n)

2009-10-05 Thread BalaMurugan Kannan
If the array is sorted, doing xor of a[n] and a[n+] will result 0 for duplicate no. --Bala On Mon, Oct 5, 2009 at 7:06 PM, Ramaswamy R ramaswam...@gmail.com wrote: Use a bit-field of M bits to keep track of the presence of X..X+M-1. We can do 2^32/M passes (if the elements are 32-bit size) to

[algogeeks] Lucky numbers

2009-01-03 Thread kannan
All the numbers from 1 to infinity are written in sequence: 1,2,3,4,5,6,7,8,9,10,11,12,13,14. in the first iteration, every second number is removed, leaving: 1,3,5,7,9,11,13 in the second iteration, every third number in the above sequence is removed, thus leaving: 1,3,7,9,13 in the

[algogeeks] Happy Valentines Day Indian Tamil Actress First Night Video Clips INdian Masala Clips Kiss Image Bed sex Image

2008-02-13 Thread mera kannan
Actress Hot Image http://indianscinemasala.blogspot.com/Bed Hot Sexhttp://indianscinemasala.blogspot.com/Sex Hot Actress Image http://indianscinemasala.blogspot.com/Actress Hot Videohttp://indianscinemasala.blogspot.com/Actress Kiss Image http://indianscinemasala.blogspot.com/