Re: [algogeeks] Re: Re : Non Decreasing Numbers

2011-12-06 Thread shady
how to arrive at such a formulation ? can any one derive this formula ? On Mon, Sep 26, 2011 at 12:09 AM, asdqwe wrote: > that would be (n+9)C(n).. > > > On Sep 25, 10:05 pm, shady wrote: > > @sanjay can you please tell how did you arrive at that solution ? > > > > > > > > > > > > > > > > On Su

Re: [algogeeks] Java Collections

2011-12-06 Thread Shravan Kumar
you need to override equals and hashcode methods. On Mon, Dec 5, 2011 at 12:23 PM, pa7751 wrote: > Hi > > I have a Person Object that has members: firstname, lastname and DOB > public class Person { >private String firstName; >private String lastName; >private Date dob; > >/** Co

[algogeeks] Re: Sub-array problem

2011-12-06 Thread GIRIDHAR IS
@sourabh can you explain me how it will work for this example a[]={2,7,3,4,5,8,10} On Dec 7, 12:17 am, sourabh singh wrote: > @ sourabh :-) yep, got your point... it wont work for all cases. > but > if we set initial max to a negative value . say max possible 64 bit > -ve number.then ? > po

Re: [algogeeks] Re: Sub-array problem

2011-12-06 Thread sourabh singh
@ sourabh :-) yep, got your point... it wont work for all cases. but if we set initial max to a negative value . say max possible 64 bit -ve number.then ? point is though the code has limitations it will work fine mostly. On 12/5/11, sourabh wrote: > @sourabh singh.. > > Hey u don't need an exam

Re: [algogeeks] Re: Finding the repeated element

2011-12-06 Thread atul anand
@Dave : sorry , i considered sorting a prerequisite for the given problem . should have read it properly before posting. On Tue, Dec 6, 2011 at 8:56 PM, Dave wrote: > Atul: The original poster asked for an algorithm that is O(n) in time > and O(1) space. So please tell us how you are going to so

[algogeeks] Stanford Online Study

2011-12-06 Thread sanchit mittal
Regards -- Sanchit Mittal Third Year Undergraduate Computer Engineering Delhi College of Engineering ph- +919582414494 > > Stanford Online Study – Win an iPad 2 > > The MobiSocial Computing Lab at Stanford University is inviting people to > participate in a really cool online study. Please sign

[algogeeks] Re: Sudoku Solver

2011-12-06 Thread shady
backtracking On Dec 6, 5:05 pm, Vishnutej wrote: > Can anyone tell me how to write a generic code for any board size of sudoku? > I mean we can write code for a normal 9x9 sudoku board..What about > 16x16,25x25...?? -- You received this message because you are subscribed to the Google Group

[algogeeks] Re: Finding the repeated element

2011-12-06 Thread Dave
Atul: The original poster asked for an algorithm that is O(n) in time and O(1) space. So please tell us how you are going to sort the array with those limitations. Dave On Dec 6, 1:35 am, atul anand wrote: >  Given : 4 2 8 9  5 1 9 > > sort the array. > > sorting: 1 2 4 5 8 9 9 > > for ( i = 0 ;

[algogeeks] Sudoku Solver

2011-12-06 Thread Vishnutej
Can anyone tell me how to write a generic code for any board size of sudoku? I mean we can write code for a normal 9x9 sudoku board..What about 16x16,25x25...?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on t

Re: [algogeeks]

2011-12-06 Thread Lucifer
@payel and anurag.. The algo that i have given is the same one that is used by "next_permutation".. And yes, its returns the next higher permutation.. In case ur input already points to the largest number then it will return the smaller number... On Dec 6, 12:38 pm, payel roy wrote: > @anurag, doe

Re: [algogeeks]

2011-12-06 Thread Lucifer
@payal and anurag.. The algo that i have given is the same one that is used by "next_permutation".. And yes, its returns the next higher permutation.. In case ur input already points to the next higher element then it will return the smaller number... On Dec 6, 12:38 pm, payel roy wrote: > @anu

[algogeeks] Re: Thanks to Algogeeks

2011-12-06 Thread ravu sairam
congrats -- 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, visit this gro

Re: [algogeeks] Re: How random numbers are generated?

2011-12-06 Thread Prakash D
how those generators will generate? any idea? On Tue, Dec 6, 2011 at 2:14 AM, Don wrote: > The "rand" function is implementation defined, so it doesn't work the > same for every compiler. Most of them use a pseudo-random generating > function such as linear congruential generators, lagged Fibon