+1
On Tue, Sep 14, 2010 at 4:27 PM, Rohit Saraf wrote:
> well i just wanted u to know that there is a very nice place called
> www.google,com where u can find many things.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to th
@Gene, it isn't about related words, its abt matching words!
On Wed, Sep 1, 2010 at 8:26 PM, saurabh singh wrote:
> I think DS will be somewhere between suffix and trie DS
>
>
> On Wed, Sep 1, 2010 at 9:35 AM, jaladhi dave wrote:
>
>> trie
>>
>> On Wed, Sep 1, 2010 at 5:45 PM, Arun wrote:
>>
>>>
I guess, you should be using a suffix tree.
On Wed, Sep 1, 2010 at 5:45 PM, Arun wrote:
> You are given the amazon.com database which consists of names of
> millions of products. When a user enters a search query for particular
> object with the keyword say "foo" , output all the products which
I guess it is a dynamic programming problem.
On Wed, Jul 14, 2010 at 11:34 AM, Anand wrote:
> One approach will be while creating a BST and also store position of the
> element in the original array. While constructing ar_low check for two
> condition 1. element should be less than the given ele
@trdant,
is non-linear random number different from general random number?
On Sun, Jun 27, 2010 at 9:36 AM, Anurag Sharma wrote:
> int getNum(){
> int arr[]={104,105,106,108};
> return arr[(int)(Math.random()*4)];
> }
>
> Anurag Sharma
>
>
>
> On Sat, Jun 26, 2010 at 8:43 PM, trdant wrote:
>
>
I think in-order traversal would solve the problem.
On Thu, Jun 24, 2010 at 4:24 PM, Anurag Sharma wrote:
> I once posted it to my blog. Perhaps its the same you are asking :
>
> http://anuragsharma-sun.blogspot.com/2010/03/converting-bst-to-circular-doubly.html
>
> Anurag Sharma
>
>
>
> On Mon,
p>q ? p : q ; i think it is that simple, otherwise i'm missing something.
On Sun, Jun 20, 2010 at 9:10 AM, anand verma wrote:
> int max(int a,int b)
> {
> int max;
> (a/b)&&(max=a)||(max=b);
> return max;
>
> }
>
> --
> You received this message because you are subscribed to the Google Groups
O(S +n ) only when the denominations are in sorted order.isn't it?
On Sun, Jun 20, 2010 at 8:41 AM, Anand wrote:
> Complexity will be O(S+n) S = Sum required N = Number of denominations
>
> On Sat, Jun 19, 2010 at 12:48 PM, Chakravarthi Muppalla <
> chakri...@gmail.com&g
Hi anand,
could you please enlighten on the running time of the code?
On Sun, Jun 20, 2010 at 1:12 AM, Anand wrote:
> Here is my approach for solving this problem using DP.
>
> http://codepad.org/Op41weg5
>
> <http://codepad.org/Op41weg5>
>
> On Thu, Jun 17, 20
@everyone:
is there one planning to participate in http://byoc.in/13/tournaments.html
Kindly let me know.(This may not a proper thread to post, but please excuse
me this time).
On Sun, Jun 20, 2010 at 1:18 AM, Chakravarthi Muppalla
wrote:
> Hi anand,
> could you please enlighten on the r
you will have to take top-down/bottom-up approach.
getMaxWidth(node tree){
int n = getHeight(tree), w=1;
for(int i=1; i< n; i++){
w = getWidth(tree, i);
if(w <= maxWidth)
continue;
else
maxWidth = w;
}
Syso("Maximum width is"+maxWidth);
}
getWidth(node tree,level l){
I think that we need to go by dynamic programming.
Ex: 1,3,7,4,9 T=23
Sort: 1,3,4,7,9
subtract max value from T(23-9=14 )
find Best Solution for (14) --> sub (14-9 = 5), Search for 5.(5-4 = 1) So
Answer would be: 9,9,4,1
Search can be binary search as the array is already sorted.
At every step best
; if ( && map[num] == false){
> map[ S - num ] = true ;
> } else {
>
> }
>
>
> On Jun 12, 11:40 am, Chakravarthi Muppalla
> wrote:
> > I would use an array.
> >
> > a[] = 1 3 7 8 9 78 67 23
> > a[] = 1 3 7 8 9 23 67 78 //sort the ar
I would use an array.
a[] = 1 3 7 8 9 78 67 23
a[] = 1 3 7 8 9 23 67 78 //sort the array
reqSum = 30;
for i :a.length-1; i>=0; i--
t = reqSum - a[i];
if(t is negative) continue;
find(t);//in the rest of the array;(binary search)
if(t found in the array) return index of t, cur
@Umer
'categorize the words into 26 categories depending on the initial character',
as far as i know this is the principle of a trie. look up trie for the next
word,
if exists increment count; other wise start counter and insert into trie; i
think this one would work.
--
You received this message
as long as it is an undirected graph;simple dfs would suffice!
On Tue, Nov 24, 2009 at 10:13 PM, Rohit Saraf
wrote:
> But then ..
> think..
> for every two pairs of nodes you have to check whether both are connected
> to root and then you will say yes/no.
> And you will have to do this for all di
measure jvm memory usage before/after creating ur object; but it is not
assured to give the correct size(gc).
or u can use a premain agent.
On Wed, Nov 25, 2009 at 12:37 AM, Abhijeet Kumar
wrote:
> How can i find size of an object in java
> plsss answer asap
>
> --
> You received this messag
17 matches
Mail list logo