[algogeeks] Re: Need Help with PHP/HTML

2012-07-19 Thread sahil taneja
hey check this out.. http://www.w3schools.com/html/html_forms.asp Hope this will serve the purpose:) On Tuesday, 17 July 2012 01:12:02 UTC+5:30, nandita raman wrote: Hello, I am working on PHP/HTML/ XML-RPC. I have a website, where one link shows the list of files as checkboxes and a

Re: [algogeeks] Re: Need Help with PHP/HTML

2012-07-19 Thread Nandita Raman
Thanks all! It worked :) On Thu, Jul 19, 2012 at 12:30 AM, sahil taneja sahiltanej...@gmail.comwrote: hey check this out.. http://www.w3schools.com/html/html_forms.asp Hope this will serve the purpose:) On Tuesday, 17 July 2012 01:12:02 UTC+5:30, nandita raman wrote: Hello, I am

[algogeeks] Re: Need help

2012-04-13 Thread Ramindar Singh
You have not taken care of the test case where the number is repeated more than once in a single list and is not there in other lists. Problem desc - the final list including only those ID numbers that appeared in at least 2 out of the 3 lists so it should not display the numbers which appear

Re: [algogeeks] Re: Need help

2012-04-13 Thread Rishabh Jain
@ raminder.. its clear that number cannot be specified in same list twice..even asked in a comment from admin. On 4/13/12, Ramindar Singh ramin...@gmail.com wrote: You have not taken care of the test case where the number is repeated more than once in a single list and is not there in other

Re: [algogeeks] Re: Need help

2012-04-13 Thread Rishabh Jain
@ kuldeep thanks...that wrked..bt still cud nt understand that what difference making that global made.. On 4/13/12, Rishabh Jain rishabh@gmail.com wrote: @ raminder.. its clear that number cannot be specified in same list twice..even asked in a comment from admin. On 4/13/12, Ramindar

[algogeeks] Re: Need help

2011-06-15 Thread Maksym Melnychok
EkoPath compiler has been open sourced recently: http://www.pathscale.com/ekopath-compiler-suite -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

[algogeeks] Re: Need help

2011-06-15 Thread shashankreddy509
Thanks alot for the response. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/302D7BLEHOAJ. To post to this group, send email to algogeeks@googlegroups.com.

[algogeeks] Re: Need help

2011-06-15 Thread siva viknesh
code blocks On Jun 15, 9:05 pm, shashankreddy509 shashankreddy...@gmail.com wrote: Thanks alot for the response. -- 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: Need help on Divide and Conquer Algorithm

2011-05-21 Thread immanuel kingston
Solution: int majorityElement(int a[], int n) { if (a == null || a.length == 0 || n=0) return -1; int mElement = a[0]; int count=1; for (int i=1; i n; i++) { if (a[i] == mElement) { count++; } else { count--; } if (count =

Re: [algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-05-12 Thread pacific :-)
a sort and another traversal would also do the same job in o( nlogn + n ) ?? On Fri, Apr 15, 2011 at 12:49 AM, vishwakarma vishwakarma.ii...@gmail.comwrote: complexity : O(n) + O(nlogn) Sweety wrote: Question :Let A[1..n] be an array of integers. Design an efficient divide and conquer

[algogeeks] Re: Need help on fenwick trees

2011-05-02 Thread KK
Search Topcoder Tutorial on Google.. On Apr 17, 9:06 pm, naga vinod kumar vinodkumark...@gmail.com wrote: Hi Guys ,                    Can any one give link for  tutorial or videos about segment trees. I am unable to understand the basic idea  behind it . Regards, vinod -- You received

[algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread vishwakarma
complexity : O(n) + O(nlogn) Sweety wrote: Question :Let A[1..n] be an array of integers. Design an efficient divide and conquer algorithm to determine if A contains a majority element, i.e an element appears more than n/2 times in A. What is the time complexity of your algorithm? Answer:

[algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread vishwakarma
I can post solution of this complexity if you want !! On Apr 15, 12:19 am, vishwakarma vishwakarma.ii...@gmail.com wrote: complexity : O(n) + O(nlogn) Sweety wrote: Question :Let A[1..n] be an array of integers. Design an efficient divide and conquer algorithm to determine if A contains a

Re: [algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread LALIT SHARMA
Yes , I also need the same...Thanks for the help . On Fri, Apr 15, 2011 at 12:52 AM, vishwakarma vishwakarma.ii...@gmail.comwrote: I can post solution of this complexity if you want !! On Apr 15, 12:19 am, vishwakarma vishwakarma.ii...@gmail.com wrote: complexity : O(n) + O(nlogn)

[algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread vishwakarma
Let A be the input array; Now algorithm is follows; struct leave{ int cand; int count; }; struct leave tree[120]; void build(int s,int e,int node ,int *A) { if(s == e){ tree[node].cand = A[s]; tree[node].count = 1;

[algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread vishwakarma
example : let the array be { a,b,a,b,c,d,e,d,d,e,f}; now... step 1 :pick any 2 different element and remove from the array till array contains only same elements or any single element ...// dis is implemented wid the above mentioned funtion build() if there is any element whose occurence

Re: [algogeeks] Re: Need help

2010-07-07 Thread Priyanka Chatterjee
Firstly it is srm 475, the following link has the problem http://www.topcoder.com/stat?c=problem_statementpm=10878rd=14156 @crazysaikat : Sorry for misconstruing you. As this group is public it is better not to post problems of a srm while it is running. Apart from discussing it here, if you need

[algogeeks] Re: Need help

2010-07-06 Thread crazysaikat
Hey i mean to say, please help after the contest only, i didn't mean to cheat anyway, its only that i have to leave my net early due to some reason thats why i posted it. On Jul 6, 5:03 pm, Priyanka Chatterjee dona.1...@gmail.com wrote: Contest in running and you are posting the 550 points

[algogeeks] Re: Need help

2010-07-06 Thread crazysaikat
Hey, its on a java applet, you can download it from www.topcoder.com/tc, and enter past competition, SRM 375, in it its the medium level problem, i have copied all the text in the post, please help me, i have got no idea how to tackle such type of problem. On Jul 6, 5:20 pm, Jitendra Kushwaha

[algogeeks] Re: Need Help in a new problem

2009-03-14 Thread Amina Maarouf
NP complete, sorry On 3/14/09, Miroslav Balaz gpsla...@googlemail.com wrote: NP what? 2009/3/13 Amina Maarouf amina.maar...@gmail.com this problem was proved to be NP in a conference paper published recently. On Fri, Mar 13, 2009 at 10:44 AM, Miroslav Balaz gpsla...@googlemail.com

[algogeeks] Re: Need Help in a new problem

2009-03-14 Thread Amina Maarouf
I found a number of real life applications for the problem, like garbage collection, a version of postman problem, gas system construction.. I am looking for applications for the problem in networks, if any one can help. On 3/14/09, Miroslav Balaz gpsla...@googlemail.com wrote: NP what?

[algogeeks] Re: Need Help in a new problem

2009-03-14 Thread Miroslav Balaz
I don't know any concrete real life problem, of course everyting real life problem that is in NP can be reducet to this problem. That includes timetable sheduling. | think there is no such problem in networks, because you need to know topology ad it has to be fixed. And if you want to make

[algogeeks] Re: Need Help in a new problem

2009-03-14 Thread Ajinkya Kale
I think there is a 4^k kernel for TSP .. On Sat, Mar 14, 2009 at 4:49 PM, Miroslav Balaz gpsla...@googlemail.comwrote: I don't know any concrete real life problem, of course everyting real life problem that is in NP can be reducet to this problem. That includes timetable sheduling. | think

[algogeeks] Re: need help for graph problem ...

2007-05-01 Thread Karthik Singaram L
Hi, I guess he is going by the assumption that the queries will be large enough that precomputing the all-pairs shortest paths is better. Anyways..mukesh..this is what you need.. In the place of your output while(cin.get(c) c!='\n') { cin.unget();

[algogeeks] Re: need help

2007-02-22 Thread NUPUL
On Feb 20, 11:18 pm, ramtin [EMAIL PROTECTED] wrote: Hi, could anybody help me to solve this problem http://acm.zju.edu.cn/show_problem.php?pid=1002 This is a neat variant of the n-Queens problem: place n Queens on an nxn chess board so that no two queens attack each other. The most

[algogeeks] Re: need help

2007-02-20 Thread Shayan Ehsani
This is easy BackTrack problem ,I think On 2/20/07, ramtin [EMAIL PROTECTED] wrote: Hi, could anybody help me to solve this problem http://acm.zju.edu.cn/show_problem.php?pid=1002 --~--~-~--~~~---~--~~ You received this message because you are

[algogeeks] Re: need help

2007-02-20 Thread Lego Haryanto
Won't brute force does the trick? Looks like it's at most 4x4 (correct me if I'm wrong). You could play around with bitmasks probably, ... treat each cell as one bit, ... probably also worthwhile to see what the bitmask corresponds to the controlled cells if a rook is placed in certain

[algogeeks] Re: need help

2007-02-20 Thread ramtin
I'm sorry but I couldn't understand your code and I think we can't use BackTrack because it is useful for problem that we want to find a good leaf but in this problem we must check all possible combinations On Feb 20, 11:34 pm, Lego Haryanto [EMAIL PROTECTED] wrote: Won't brute force does

[algogeeks] Re: need help

2007-02-20 Thread Lego Haryanto
Ok, ... it's easier to view it this way ... consider a maximum 4x4 board. So, this is the same as 16 cells. In each cell, obviously it could either be 0 or 1, ... 0 being empty, and 1 being occupied. Just looking at the fact above, ... you can see we can have at most 2^16 combinations or

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-02-03 Thread dor
I am assuming that by random you mean uniformly at random (that is, the probability of generating i is 1/5) map the following pairs of numbers (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2) to 1, 2, .. , 7 respectively let p_i denote the pair corresponding to the number i (e.g. p_1 = (1,

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-31 Thread [EMAIL PROTECTED]
random generator is uniformly distributed -Original Message- From: algogeeks@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sandesh Sent: Tuesday, January 30, 2007 11:09 PM To: Algorithm Geeks Subject: [algogeeks] Re: (need help) How to solve this random number generatioin

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-31 Thread Pradeep Muthukrishnan
Sent: Tuesday, January 30, 2007 11:09 PM To: Algorithm Geeks Subject: [algogeeks] Re: (need help) How to solve this random number generatioin problem? suppose given function returns the random numbers between 1 -5 then you can have (given + given) % 7 +1 which

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-31 Thread Gene
On Jan 30, 8:57 pm, Jialin [EMAIL PROTECTED] wrote: Question: Given a program which can generate one of {1, 2, 3, 4, 5} randomly. How can we get another generator which can generate one of {1,2,3,4,5,6,7} randomly? Thank you! If you generate random 1 to 5 twice, there are 25 equally

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-31 Thread pramod
Why can't we simply take the 1..5 random number, multiply by 7 and divide by 5. --~--~-~--~~~---~--~~ 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: (need help) How to solve this random number generatioin problem?

2007-01-31 Thread Prunthaban Kanthakumar
Then you will get only the following numbers (1*7)/5 = 1 (2*7)/5 = 2 (3*7)/5 = 4 (4*7)/5 = 5 (5*7)/5 = 7 What you will do to get 3 and 6? On 2/1/07, pramod [EMAIL PROTECTED] wrote: Why can't we simply take the 1..5 random number, multiply by 7 and divide by 5.

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-30 Thread aakash mandhar
/* You can do it as shown below. */ #include iostream #include stdlib.h using namespace std; int random(int low,int high) { srand(time(NULL)); int n=(high-low+1); return low + (rand()%n); } int main() { coutrandom(1,7); return 0; } On 1/31/07, Jialin [EMAIL PROTECTED] wrote: Question:

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-30 Thread Sandesh
suppose given function returns the random numbers between 1 -5 then you can have (given + given) % 7 +1 which will generate between 1 and 7 . -Sandesh Hegde On Jan 31, 6:57 am, Jialin [EMAIL PROTECTED] wrote: Question: Given a program which can generate one of {1, 2, 3, 4,

[algogeeks] Re: (need help) How to solve this random number generatioin problem?

2007-01-30 Thread Ming \(Amos\) Zhang
It's not uniformly distributed, suppose the given random generator is uniformly distributed -Original Message- From: algogeeks@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sandesh Sent: Tuesday, January 30, 2007 11:09 PM To: Algorithm Geeks Subject: [algogeeks] Re: (need help

[algogeeks] Re: need help regarding problem..

2007-01-24 Thread mukesh tiwari
Hi Minhaz thnkx for help and pointing me to my mistake but now one thing i know ... is the number of points in the input will be distinct or there may be some duplicate point . like suppose the input is like this... 9 0 1 0 2 1 2 1 3 2 3 3 3 3 0 1 0 1 1 now the output of this program will (0

[algogeeks] Re: need help regarding problem..

2007-01-24 Thread mukesh tiwari
Hi Minhaz thnkx for help and pointing me to my mistake but now one thing i know ... is the number of points in the input will be distinct or there may be some duplicate point . like suppose the input is like this... 9 0 1 0 2 1 2 1 3 2 3 3 3 3 0 1 0 1 1 now the output of this program will (0

[algogeeks] Re: Need Help on Hopcroft-Karp Algorithm

2006-08-27 Thread mahbubul hasan
well... i dont check this grp that frequently. but well... if u know hungerian then, Hopcroft is similar to hungarian except u need BFS here, and in initial push all the unmatched vertex of Left in Queue, thats all. On 8/21/06, phoenixinter [EMAIL PROTECTED] wrote: Hi guysI'm recently trying to

[algogeeks] Re: need help help n help!!!

2006-03-12 Thread gcet
hi SPX2, can u explain your algorithm in a simple language? thank you --~--~-~--~~~---~--~~ 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

[algogeeks] Re: need help help n help!!!

2006-03-12 Thread gcet
anybody can answer in detain?? 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

[algogeeks] Re: need help help n help!!!

2006-03-09 Thread pramod
Isn't third problem solved by sorting where comparison function is replaced by the equivalence tester? After sorting we just run through the array to see if there n/2 repetitions. ajay mishra wrote: @stefan , ur idea seems correct to me. On 3/8/06, SPX2 [EMAIL PROTECTED] wrote: ajay

[algogeeks] Re: need help help n help!!!

2006-03-09 Thread Dhyanesh
@pramod not quite ... the equivalence tester does not give a less than operation which is needed for sorting. It only tells whether they are equal or not. You cannot order them on the basis of that. -Dhyanesh On 3/9/06, pramod [EMAIL PROTECTED] wrote: Isn't third problem solved by sorting where

[algogeeks] Re: need help help n help!!!

2006-03-09 Thread pramod
That's true Dhyanesh, thanks. Any prose explanation for SPX2's pseudo code? --~--~-~--~~~---~--~~ 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

[algogeeks] Re: need help help n help!!!

2006-03-08 Thread ajay mishra
@stefan , ur idea seems correct to me.On 3/8/06, SPX2 [EMAIL PROTECTED] wrote: -- Ajay kr. Mishrahttp://ajay.mishra19.googlepages.comIIT KGP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

[algogeeks] Re: need help help n help!!!

2006-03-07 Thread SPX2
i believe for the second problem it is enough to sort them using quicksort method in O(nlgn) but retain a vector with initial positions(wich after quicksort is applied will be a permutation vector of the original one). Now you have to find out number of pairs (ai,aj) with ij and ai2aj. Now this

[algogeeks] Re: need help help n help!!!

2006-03-07 Thread SPX2
Finding ah...isnt that simple... you have to do a binary search for it... that means that if you're on step j in the for above...you will have to do (n-j)lg(n-j)computations well...I think it would bring the algorithm to a total of O(sum from j=0 to n of (n-j)lg(n-j) O(n^2lgn) if anyone can