[algogeeks] Re: finding the index

2006-08-04 Thread Gene
kumar wrote: > Let A is an array of positive or negative > integers of size n, where A[1] < A[2] < A[3] < ... < A[n]. Write an > algorithm to find an i such that A[i] = i provided such i exists. What > is the order of execution time of algorithm. Prove that O ( log n ) is > the best possible.. A

[algogeeks] Re: Intersection of 2 rectangles

2006-08-04 Thread Vishal
You assumed that the rectangles are horizontal which is not a condition. On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: To define a rectangle only 2 diagonal coordiantes((left,top) and(right,bottom) are sufficient. void main(){   int top1,left1,bottom1,right1;//rect1   int top2,le

[algogeeks] Re: Young's Tab

2006-08-04 Thread subrahmanyam kambala
Solution To 1st problem maintain two single dimension arrays...initially store 1st rows in both arrays from both input arrays find minimum element in stored array it takes O(n) time replace that minimum ele with correspondin column next element [ Example  if a[0][0] is minimum replace with a[1][0

[algogeeks] longest cycle

2006-08-04 Thread Mohammad Moghimi
Hi, Are you know any algorithm for finding longest cycle in a graph? I think this is an NP-Complete problem, but a working algorithm would be desired, Consider nodes number to be about 30, and time limit is about 1second. -- -- Mohammaddo you C?!! double m[] = { 9580842103863.650391, 133470973390.2

[algogeeks] Re: where to find problems?

2006-08-04 Thread HalFas`
thanks ! :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Fo

[algogeeks] Re: where to find problems?

2006-08-04 Thread Mohammad Moghimi
http://www.topcoder.com/ http://acm.uva.es/contest/ http://acm.uva.es/p/http://acm.uva.es/archive/nuevoportal/ http://acm.zju.edu.cn/http://acm.timus.ru/ http://www.usaco.org/ http://acm.tju.edu.cn/http://acm.pku.edu.cn/ http://acm.sgu.ru/ http://www.spoj.pl http://www.recmath.org/ http://acm.fzu.e

[algogeeks] Re: Bubble breaker

2006-08-04 Thread ridvansg
Yes this is the game --~--~-~--~~~---~--~~ 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 [EMAIL PROT

[algogeeks] Re: finding the index

2006-08-04 Thread Atamyrat Hezretguliyew
On 8/4/06, kumar <[EMAIL PROTECTED]> wrote: > > Let A is an array of positive or negative > integers of size n, where A[1] < A[2] < A[3] < ... < A[n]. Write an > algorithm to find an i such that A[i] = i provided such i exists. What > is the order of execution time of

[algogeeks] Re: Bubble breaker

2006-08-04 Thread Atamyrat Hezretguliyew
On 8/4/06, ridvansg <[EMAIL PROTECTED]> wrote: > > Hi, > Lately I saw an interesting game and wonder is there a good algorithem > to find the best solition. > > You have 5 type of bubbles in a matrix. You can select 2 or more > neighboring bubbles with the same color and remove them. The bubbles >

[algogeeks] where to find problems?

2006-08-04 Thread Lukas Šalkauskas
Hi,  simple question for you: where to fing various problems(programming) online. Say all sites you know.Thanks. -- You can contact me by :   msn messanger: [EMAIL PROTECTED]      yahoo messanger: [EMAIL PROTECTED]   Google Talk: [EMAIL PROTECTED]   Skype: halfas.online.now    IRC: HalFas`  (irc2.

[algogeeks] Re: GIVE AN ALGORITHM TO MERGE 2 BINARY SEARCH TREES

2006-08-04 Thread Bruno Avila
Look to the problem as merge of two sorted array, thus, use the same technique the merge sort uses (linear time).Regards,BrunoOn 8/4/06, deadlock <[EMAIL PROTECTED]> wrote:How to basically merge the two BST?? --~--~-~--~~~---~--~~ You received this message because

[algogeeks] Bubble breaker

2006-08-04 Thread ridvansg
Hi, Lately I saw an interesting game and wonder is there a good algorithem to find the best solition. You have 5 type of bubbles in a matrix. You can select 2 or more neighboring bubbles with the same color and remove them. The bubbles are neighboring if they have common border.(no diagonals) If

[algogeeks] finding the index

2006-08-04 Thread kumar
Let A is an array of positive or negative integers of size n, where A[1] < A[2] < A[3] < ... < A[n]. Write an algorithm to find an i such that A[i] = i provided such i exists. What is the order of execution time of algorithm. Prove that O ( log n ) is the best possible

[algogeeks] The perspicacious pirates

2006-08-04 Thread kumar
The pirate ship logica will accept only on board pirates who would rather live than die, would rather have more gold than less gold, and who have perfectly logical minds.At the end of profitable sea voyage, there are 100 private on board, and a total of 1000 coins to divide between them. They use

[algogeeks] Jay Leno Message Board FUN..... WIZ he is

2006-08-04 Thread [EMAIL PROTECTED]
Subject: Earth IS The Black Hole of the Universe ! ( NBC ) On Thu 08/03, NBC From: NBC Jay Leno Message Board I thought you might be interested in reading this web page: http://boards.nbc.com/nbc/index.php?act=ST&f=8&t=637679 From, President of the United STUDS Regards, The NBC te

[algogeeks] GIVE AN ALGORITHM TO MERGE 2 BINARY SEARCH TREES

2006-08-04 Thread deadlock
How to basically merge the two BST?? --~--~-~--~~~---~--~~ 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 emai

[algogeeks] Re: Intersection of 2 rectangles

2006-08-04 Thread Balasubramaniam Mariappan
Intersection of two rectangles need not be rectangle.. Two rectangles can intersect on any manner...  Regards, Bala -- A person who is original might be wrong, but a person who does not risk being wrong can never be right. Osho --~--~-~--~~~---~--~~ You receive

[algogeeks] Re: Young's Tab

2006-08-04 Thread [EMAIL PROTECTED]
Consider a Array of N x N For example take 3 X 3 Since the array is sorted by row and column , sort all the array elements by reading it in zig-zag order. for example 589 6 10 13 11 15 17 can be read as 5 6 8 9 10 11 13 15 17 by chechking whether the row or column entry c

[algogeeks] Re: Is there any better solution than 0(nlgn) ?

2006-08-04 Thread Atamyrat Hezretguliyew
On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > 1 #include > 2 > 3 int main() { > 4 > 5 int A[] = {8,5,4,2,9}, B[] = {1,2,3,4,6}; > 6 static int fo[10] ,i,ret = 0 ; /* max value is stored in A > which is 9 > 7if we wouldn't kno

[algogeeks] Re: Is there any better solution than 0(nlgn) ?

2006-08-04 Thread [EMAIL PROTECTED]
1 #include 2 3 int main() { 4 5 int A[] = {8,5,4,2,9}, B[] = {1,2,3,4,6}; 6 static int fo[10] ,i,ret = 0 ; /* max value is stored in A which is 9 7if we wouldn't know this, we'd nee to rely 8on INT_MAX

[algogeeks] Re: Intersection of 2 rectangles

2006-08-04 Thread [EMAIL PROTECTED]
To define a rectangle only 2 diagonal coordiantes((left,top) and (right,bottom) are sufficient. void main(){ int top1,left1,bottom1,right1;//rect1 int top2,left2,bottom2,right2;//rect2 int top3,left3,bottom3,right3;//intersecting rect printf("first rect :");

[algogeeks] A very powerful software

2006-08-04 Thread langke
The Returnil Virtual System makes your Windows system impervious to virus attack, to spyware tracking and it automatically sanitizes all Web activities and surfing history. This is a powerful technology that clones a "copy" of your Windows system in one second. If the System Partition Protection i