[algogeeks] Re: Online Job Directory

2007-11-03 Thread Dhyanesh (ધયાનેશ)
Report this profile as spam: http://groups.google.com/groups/abuse?url=http%3A%2F%2Fgroups.google.com%2Fgroups%2Fprofile%3Fenc_user%3DGblPpxBBT4-MvI5XR0ZYoR4i_V9C%26_done=%2Fgroups%2Fprofile%3Fenc_user%3DGblPpxBBT4-MvI5XR0ZYoR4i_V9C%26; On 11/3/07, maithili [EMAIL PROTECTED] wrote:

[algogeeks] Re: Spiral number

2007-10-21 Thread Dhyanesh (ધયાનેશ)
Use the property that one of the diagonals has squares of odd numbers. So given a co-ordinate in that diagonal you know the number at that position. For positions not on that diagonal you can add/subtract appropriately and obtain the number you need. -Dhyanesh On 10/18/07, mukesh tiwari [EMAIL

[algogeeks] Re: Problem with conditional statement

2007-06-18 Thread Dhyanesh (ધયાનેશ)
It says If there is more than one solution print the pair with smaller X value. Also I believe for a value of X only one of the 2 Y values might work, not sure though. -Dhyanesh On 6/18/07, mukesh tiwari [EMAIL PROTECTED] wrote: Hi everybody i am trying to solve problem

[algogeeks] Re: A cycle with minimum length

2007-03-31 Thread Dhyanesh (ધયાનેશ)
Hi You can solve this by dynamic programming/memoization. Start off from the left and maintain two lists of points, one for forward traversal and one for reverse traversal. Each point would be in any one of the lists. When you encounter a point try putting it in each of the lists turn by turn

[algogeeks] Re: Problem 4.2 from Introduction to algorithms

2006-11-17 Thread Dhyanesh (ધયાનેશ)
1) Scan through the array counting number of 0s and 1s in MSB, as well as separating the 0s into an array arr0 and 1s into an array arr1 (if you do not want to use extra space you can use splitting around pivot pass of quicksort). 2) You would know how many 0s and 1s should be present in MSB for

[algogeeks] Re: Proving Waring hypothesis...

2006-10-31 Thread Dhyanesh (ધયાનેશ)
I have a slight improvement O ( n^2 log (n ) )Say you have a^2 + b^2 + c^2 = d.Keep a sorted list of all possible a^2 + b ^ 2 ... this would take n^2 time to generate and n^2 log n to sort. Now loop over all possible 'd' and 'c' and compute d - c ^ 2. Use binary search to determine whether that

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
Djikstra's or any other single-source shortest path algorithm should be good enough I guess.-DhyaneshOn 10/30/06, vijay [EMAIL PROTECTED] wrote:Anyone know how to solve this problem... http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=3502...I thk its a toughie...

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
, Dhyanesh (ધયાનેશ) [EMAIL PROTECTED] wrote: Djikstra's or any other single-source shortest path algorithm should be good enough I guess. -DhyaneshOn 10/30/06, vijay [EMAIL PROTECTED] wrote:Anyone know how to solve this problem... http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
Djikstra can be used here? On 10/30/06, Dhyanesh (ધયાનેશ) [EMAIL PROTECTED] wrote: Djikstra's or any other single-source shortest path algorithm should be good enough I guess. -Dhyanesh On 10/30/06, vijay [EMAIL PROTECTED] wrote: Anyone know how to solve this problem... http://acmicpc

[algogeeks] Re: iarcs basic division (problem 1 and 2)

2006-09-18 Thread Dhyanesh (ધયાનેશ)
I would agree with problem 2.However, in problem 1, they have given you the different operations right ? I do not think you can choose your own operation. From the problem statement - Thisis followed by M lines each containing K integers describing the M different operation. So if you have a