[algogeeks] Re: Matrix Searching

2012-09-16 Thread Tushar
For a large list of words, At each location, look for the character before/after that character in the word on opposite sides of the initial location, and continue from there Is it like: frequency count of 'a' is smallest 'a' is in 2 words available and alpha shall we check for 'v' near 'a';

Re: [algogeeks] help to give DP solution

2012-09-16 Thread Tushar
we can assign minimum possible value, like negative infinity to the diagonal elements. Then they would not be considered for maximizing the sum. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] array problem

2012-09-16 Thread Tushar
@srikanth we can use segment trees to get sum of an interval but there is another condition of sum of distinct numbers only. how can we take that into account in a segment tree? On Thursday, 6 September 2012 17:35:59 UTC+5:30, srikanth reddy malipatel wrote: post the logic not the code! BTW

Re: [algogeeks] help to give DP solution

2012-09-16 Thread atul anand
@tushar :- correct... On Sun, Sep 16, 2012 at 12:59 PM, Tushar tushicom...@gmail.com wrote: we can assign minimum possible value, like negative infinity to the diagonal elements. Then they would not be considered for maximizing the sum. -- You received this message because you are

[algogeeks] celebrity problem

2012-09-16 Thread rahul sharma
http://www.geeksforgeeks.org/archives/19622 Plz tell what is size 4 in this case -- 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

Re: [algogeeks] Pivot postion of quick sort

2012-09-16 Thread Ouyang
for a pivot picked randomly, even the same input array would have different time complexity going through quicksort thousands of thousands of times. the worst case could happen too(but the probability is very small), so random-pivot-set has statistically on average O(logN), we are talking about

[algogeeks] Re: infibeam placement procedure

2012-09-16 Thread Prasanth Badboy
Violating the rules of the group...!! Itz a place to discuss about algorithms.. not to ask wat wil b coming in ur xams..! LOL..!! rather to discuss about interview questions , go for GeeksForGeekshttp://www.geeksforgeeks.org/forum/view/company-interview, Hope it is useful , All d best :) On

Re: [algogeeks] help to give DP solution

2012-09-16 Thread Rahul Kumar Patle
@atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is based on zeros.. in my problem what value i will have to consider as base/terminating values because there may not be same values in coloumn and rows.. second thing you use subtraction there, here will

Re: [algogeeks] help to give DP solution

2012-09-16 Thread atul anand
make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX now i guess same algo will work..no changes required. On Sun, Sep 16, 2012 at 4:42 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: @atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is

Re: [algogeeks] help to give DP solution

2012-09-16 Thread atul anand
typo error :- mat[ i ] [ j ] to -ve sign and make mat[ i ][ i ]=INT_MAX On Mon, Sep 17, 2012 at 9:43 AM, atul anand atul.87fri...@gmail.com wrote: make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX now i guess same algo will work..no changes required. On Sun, Sep 16, 2012 at 4:42 PM,