Re: [algogeeks] Adobe

2011-10-06 Thread siddharth srivastava
Hi

On 6 October 2011 23:11, DIVIJ WADHAWAN  wrote:

> IIIT-Delhi
>
>
Get your algos strong. Esp. Linked List and string manipulations.
Be ready to give optimized solutions to problems.
A few questions from scalability are also asked sometimes


>
> On Wed, Oct 5, 2011 at 8:45 AM, gaurav yadav wrote:
>
>> which college?
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] ADOBE

2011-09-28 Thread siddharth srivastava
On 28 September 2011 15:10, DIVIJ WADHAWAN  wrote:

> IIIT-Delhi


profile ?


>
>
> On Wed, Sep 28, 2011 at 3:03 PM, sukran dhawan wrote:
>
>> which coll ?
>>
>> On Wed, Sep 28, 2011 at 2:49 PM, DIVIJ WADHAWAN wrote:
>>
>>> Adobe is coming to my college in mid October.
>>> Can someone tell me what kind of questions do they ask, number and types
>>> of rounds etc ??
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Sorting:-

2011-09-24 Thread siddharth srivastava
Is the range of numbers provided ?

On 24 September 2011 10:26, teja bala  wrote:

> What is the efficient way to sort a M*N matrix.
>
> eg: Given a 3*4 matrix
>
> 2 6 7 12
> 11 8 5 1
> 9 3 4 10
>
> The ouput should be
>
> 1 2 3 4
> 5 6 7 8
> 9 10 11 12
>
> Matrix may contain duplicates..
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: sqrt function...

2011-09-24 Thread siddharth srivastava
On 24 September 2011 13:45, shady  wrote:

> one of the simplest way is to do binary search... :)


+1


>
>
> On Sat, Sep 24, 2011 at 8:42 PM, teja bala wrote:
>
>> http://www.geeksforgeeks.org/archives/3187
>>
>>
>> check dis one.
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon online test

2011-09-23 Thread siddharth srivastava
Hi

On 23 September 2011 17:29, raju  wrote:

> hi all,
>
> can anyone pls share the questions amazon has been asking in online written
> tests.
>
>
Search the archives
This has been answered many times in the recent days.

Best of Luck


> thanks
> raju
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-23 Thread siddharth srivastava
Hi

Congrats

What did you answer for elevator problem ?

On 22 September 2011 18:42, saurabh  wrote:

> thanx to all
>
> I have shared my interview experience at
> http://msidcinterview.blogspot.com/
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] prime factorization algo

2011-09-19 Thread siddharth srivastava
initialise a bit vector till the square root of the number and cancel out
the factors of numbers with whom divisibility has been checked (starting
from 2)
you can use bitvector to implement it.
set false for the discarded values.
if none remains true (given that you initialise the bit vector with true),
the number in question is prime.

On 20 September 2011 00:10, Manish Verma  wrote:

> does anybody know the fastest algo for prime factorization of a
> number???
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plssssssssss replyyyyyyyyyyyyyyyyy

2011-09-18 Thread siddharth srivastava
agreeing with Malay.
Better depends upon where you want to see yourself after 5 years or so.

PS: Please try to give some meaningful subject line before

On 18 September 2011 22:25, malay chakrabarti  wrote:

> depends on your forte. :)
> best of luck for either one :)
>
>
> On Sun, Sep 18, 2011 at 10:15 PM, vivek goel 
> wrote:
>
>> which  profile is  better??
>>
>> 1.  Technology Consulting
>> 2. Quality Control Analyst Systems
>>
>> if one is from software engg ( programming) background.
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] A logical Question

2011-09-15 Thread siddharth srivastava
On 15 September 2011 12:58, Tamanna Afroze  wrote:

>
> *If you are on a boat and you throw out a suitcase, Will the level of
> water increase.*


No, (if boat is in water and suitcase is thrown in water)
No (if boat is in water and you throw out suitcase on land/bank)
Yes (if you, boat and suitcase are not in water, though minuscule or may be
non-observable)



>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Returning 0 with probability p and 1 with probability 1-p

2011-09-12 Thread siddharth srivastava
On 12 September 2011 20:49, Don  wrote:

> For particular values of p we might be able to do better, but for
> unknown values of p, I can't think of anything better than this:
>
> int g(double p)
> {
>  int n = 0;
>  for(int i = 0; i < 30; ++i)
>n += n+f();
>  return n > (int)(p*1073741824.0);
> }
>



explain the magic numbers please ;)



>
> On Sep 12, 9:55 am, JITESH KUMAR  wrote:
> > Hi
> > You are given a function f() that returns either 0 or 1 with equal
> > probability.
> > Write a function g() using f() that return 0 with probability p (where
> 0 > )
> >
> > --
> > *Regards
> > Jitesh Kumar*
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Book for C++

2011-09-12 Thread siddharth srivastava
depends upon where you stand in terms of understanding of concepts

On 12 September 2011 13:50, Sanjay Rajpal  wrote:

> C++ Primer Plus by Stephen Prata.
>
>
> Sanju
> :)
>
>
>
> On Mon, Sep 12, 2011 at 1:15 AM, sukran dhawan wrote:
>
>> Bjarne stroustroup
>>
>>
>> On Mon, Sep 12, 2011 at 1:43 PM, Ankuj Gupta  wrote:
>>
>>> Hi
>>>
>>> Which is a good book for C++ ( Robert Lafore or Bjarne Stroustrup or
>>> Herbert Schildt) ?
>>>
>>> Ankuj
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Regarding my posts

2011-08-26 Thread siddharth srivastava
On 26 August 2011 08:37, Navneet  wrote:

> Though the problem mentioned was little on serious side, the thread
> turner out to be really funny :)
>


now it seems that op is not receiving any posts :D


>
> On Aug 25, 10:31 pm, shady  wrote:
> > lol, then how did this one came ?
> >
> > On Thu, Aug 25, 2011 at 10:58 PM, Abhishek <
> mailatabhishekgu...@gmail.com>wrote:
> >
> >
> >
> >
> >
> >
> >
> > > first unjoin from the group.. than rejoin the group...
> >
> > >  --
> > > 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/-/OPm4B2dlngsJ.
> >
> > > To post to this group, send email to algogeeks@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > algogeeks+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Suggestion

2011-08-26 Thread siddharth srivastava
On 27 August 2011 08:48, ankit arun  wrote:

> thanks everybody for so many suggestions... :)



so let us know when you finish all those :P


>
>
> On Sat, Aug 27, 2011 at 6:40 AM, Rahul  wrote:
>
>> If the seeker wants to do entire self study , then I would suggest CS
>> 106B Reader , it's in C ++ , BUT ideal for people who rely only on
>> internet.  ALso that Data STructure USing C ,Book by Y. KAnitikar , I
>> never saw any math in any chapters  for analysis of  algorithms they
>> write
>> . lol. Google it as CS106B reader.
>>
>> On 8/26/11, sukran dhawan  wrote:
>> > wat are u tying to say :P ? is that a good book or wat ?
>> >
>> > On Fri, Aug 26, 2011 at 7:55 PM, saurabh singh 
>> wrote:
>> >
>> >> Yayashwant kanitekar and deepali srivastava are great books
>> >>
>> >> If you find all the mistakes that they have made you have learned
>> DS(and
>> >> coding style) quite well.:p
>> >>
>> >> On Fri, Aug 26, 2011 at 2:44 PM, Suraj Fale 
>> wrote:
>> >>
>> >>> A book by 'Yashwant Kanetkar'
>> >>>
>> >>>
>> >>> On Fri, Aug 26, 2011 at 9:03 AM, Navneet 
>> wrote:
>> >>>
>> >>>> Ankit, i would also like to mention Mark Allan Weiss book on Data
>> >>>> Structures. Available in both C and C++ (different books)
>> >>>>
>> >>>> On Aug 25, 3:59 pm, Abhishek  wrote:
>> >>>> > for simplicity use,
>> >>>> > Data Structures Through C in Depth -S. K. Srivastava, Deepali
>> >>>> Srivastava
>> >>>> >
>> >>>> > all the topics are discussed in very simple manner.
>> >>>>
>> >>>> --
>> >>>> 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
>> >>>> algogeeks+unsubscr...@googlegroups.com.
>> >>>> For more options, visit this group at
>> >>>> http://groups.google.com/group/algogeeks?hl=en.
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>> --
>> >>> Regards
>> >>> Suraj Fale
>> >>> +91-9766103115
>> >>>
>> >>>
>> >>>  --
>> >>> 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
>> >>> algogeeks+unsubscr...@googlegroups.com.
>> >>> For more options, visit this group at
>> >>> http://groups.google.com/group/algogeeks?hl=en.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Saurabh Singh
>> >> B.Tech (Computer Science)
>> >> MNNIT ALLAHABAD
>> >>
>> >>
>> >>  --
>> >> 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
>> >> algogeeks+unsubscr...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/algogeeks?hl=en.
>> >>
>> >
>> > --
>> > 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
>> > algogeeks+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/algogeeks?hl=en.
>> >
>> >
>>
>>
>> --
>> Rahul
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> *Thanks & Regards*
> *Ankit Arun
> Training Placement Representative
> Information Technology
> NIT Durgapur
> BLOG*: www.obeyurthirst.blogspot.com <http://www.obeyankit.blogspot.com>
>
> *Mobile No. - +91 9635333100*
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Doubt

2011-08-21 Thread siddharth srivastava
depends upon the optimization performed.
Some compilers, on seeing a const value, store there literal value to get
faster access (as it is assumed that const won't be modified)
Hence you get the output:0 2 as value of i is now the already stored literal
in the optimized plan generated by the compiler.

But if such an optimization is not performed, then you get 2,2

On 22 August 2011 00:03, Abhishek  wrote:

> i am compiling it on linux, it is giving me the o/p 2,2.
>
> whatever i know is that, to prevent constants being modified, pointers
> should also be declared constant.
> like..
> const int *p;
>
> now it will produce error.
>
>  --
> 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/-/QBiQoXPIk78J.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Turbo C vs gcc

2011-08-20 Thread siddharth srivastava
Use gcc


> Placement questions are not compiler dependent... :P


Well, I was surprised to see the instruction in Adobe's written test. It
said, all the programs have been tested on Turbo C and advised us to answer
according to that
(and I was confused as Turbo C gives output for most of the programs which
any other standard compiler categorizes as a programming error)


>
>
> On Sat, Aug 20, 2011 at 11:32 PM, Abhishek 
> wrote:
>
>> okay..
>>
>>  --
>> 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/-/AkCySllSLJ4J.
>>
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:33, Yogesh Bhati  wrote:

> 4.ERP also
>
>
> webos wat is it?? brief
> is it related to *webOS* is a 
> proprietary<http://en.wikipedia.org/wiki/Proprietary_software>
>  mobile operating 
> system<http://en.wikipedia.org/wiki/Mobile_operating_system> running
> on the Linux kernel <http://en.wikipedia.org/wiki/Linux_kernel>.
>

Sorry for confusion. I meant a web based operating system. (related to cloud
computing or ubiquitous computing)
Contributing to an existing OS or kernel project wouldn't be bad either
(specifically for your Core Programming interest :) )

>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help!!!!!

2011-08-20 Thread siddharth srivastava
how about a webOS ? (it involves all 3 ;-) )

On 20 August 2011 21:22, Yogesh Bhati  wrote:

>  area of interest :
>>
>> 1.web related koi application
> 2.database
> 3.core programming
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:09, Yogesh Bhati  wrote:

> I m a CSE student
> Plz suggest me sum final yr project
> 1. good project that help me learn
> or
> 2.that solve sum real lyf situation means projects that are needed to make
> thngs easy for others
> do post ur suggestion
>

what is your area of interest ?



>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Can We Use STL like Vectors,Maps,Stack Queues to solve problems in Interviews

2011-08-20 Thread siddharth srivastava
On 20 August 2011 18:09, Ankur Garg  wrote:

> One of my frnds was saying its not recommended to  be Used


depends upon where you are interviewed and how much experience you have


>
> Please suggest
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c++ q

2011-08-18 Thread siddharth srivastava
On 19 August 2011 01:05, priya ramesh wrote:

> why isn't the size of empty class not equal to zero??
>

because its a container for other items, but does occupy space for its own
storage.

>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread siddharth srivastava
On 19 August 2011 00:31, priya ramesh wrote:

> it can remove methods defined in base class as well?? By overriding a
> virtual base class func??
>


I don't think that overriding is considered as removing the function  from
base class

>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread siddharth srivastava
2

On 19 August 2011 00:25, sarath prasath  wrote:

> 2..
>
> On Aug 18, 11:31 pm, jestincobol nair  wrote:
> > In (typical) object-oriented programming languages which one of the
> > following can be done by a subclass (derived class) of class *C*?
> >
> > 1. Remove methods defined in *C*
> > 2. Define instance variables (data members) not defined in *C*
> > 3. Remove instance variables (data members) defined in *C*
> >
> > 1
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Algorithms For Interviews

2011-08-16 Thread siddharth srivastava
On 16 August 2011 20:36, Yogesh Yadav  wrote:

> plz upload it againi cant open it...



if you search the group wisely (though not legal) or internet with a bit of
patient and intelligence, you'll find it with no problem


>
>
> On Tue, Aug 16, 2011 at 8:31 PM, Nitin Nizhawan 
> wrote:
>
>> sent to you ravi
>>
>> On Tue, Aug 16, 2011 at 8:16 PM, ravi kumar wrote:
>>
>>>
>>> heyy nitin.. it says da file izz locked .. can u mail me da buk.. thanx
>>> in advance
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] array ques

2011-08-15 Thread siddharth srivastava
On 15 August 2011 21:07, sagar pareek  wrote:

> int lol=2; // total lol's encountered upto now
>
> lol++;


it is a programming mistake as you have indicated the value of the important
variable constant lol to 2 and then you have incremented it. :P


>
>
> On Mon, Aug 15, 2011 at 12:41 AM, aditi garg wrote:
>
>> lol
>>
>>
>> On Mon, Aug 15, 2011 at 12:40 AM, aditya kumar <
>> aditya.kumar130...@gmail.com> wrote:
>>
>>> @aditi : sry i dint realise that n > log n .:P
>>>
>>> On Mon, Aug 15, 2011 at 12:38 AM, aditi garg 
>>> wrote:
>>>
>>>> @aditya : dis is obviously correct bt here complexity will be O(n) bt we
>>>> are asked to gv O(log n) solution
>>>>
>>>> On Mon, Aug 15, 2011 at 12:37 AM, aditya kumar <
>>>> aditya.kumar130...@gmail.com> wrote:
>>>>
>>>>> for(j=0;j>>>> {
>>>>> if(a[j]==j)
>>>>>  return j;
>>>>>  else
>>>>>  continue ;
>>>>> }
>>>>>
>>>>> this shud also be correct right ??
>>>>>
>>>>> On Mon, Aug 15, 2011 at 12:31 AM, Akash Mukherjee 
>>>>> wrote:
>>>>>
>>>>>> just my 2 cents  in d binary search, replacing key with mid, ie
>>>>>> if(a[mid] > mid)
>>>>>> check lower half
>>>>>> else upper half
>>>>>>
>>>>>> should work??
>>>>>>
>>>>>>
>>>>>> On Mon, Aug 15, 2011 at 12:26 AM, aditi garg <
>>>>>> aditi.garg.6...@gmail.com> wrote:
>>>>>>
>>>>>>> Given an ordered array A[1…n] with numbers in strictly increasing
>>>>>>> order. Find a ‘j’ such that A [j]=j or -1 if no such number exist in
>>>>>>> o (log n).
>>>>>>>
>>>>>>> --
>>>>>>> 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
>>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>>
>>>>>>>
>>>>>>  --
>>>>>> 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
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>  --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Aditi Garg
>>>> Undergraduate Student
>>>> Electronics & Communication Divison
>>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>>> Sector 3, Dwarka
>>>> New Delhi
>>>>
>>>>
>>>>  --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroup

Re: [algogeeks] program puzzle

2011-08-15 Thread siddharth srivastava
On 15 August 2011 16:48, programming love wrote:

> write a program to reverse the words in a give string.
> also state the time complexity of the algo.
>


It has already been discussed on the list a few days ago

>
> if the string is "i am a programmer"
> the output should be "programmer a am i"
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] matrix question ???!!!!!!!!!!??????????

2011-08-14 Thread siddharth srivastava
d 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
>>>>>>>>>>> algogeeks+unsubscribe@**googlegroups.com
>>>>>>>>>>> .
>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>> http://groups.google.com/**group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>  --
>>>>>>>>>> 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
>>>>>>>>>> algogeeks+unsubscribe@**googlegroups.com
>>>>>>>>>> .
>>>>>>>>>> For more options, visit this group at
>>>>>>>>>> http://groups.google.com/**group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> karthikeyankkn
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 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
>>>>>>>>> algogeeks+unsubscribe@**googlegroups.com
>>>>>>>>> .
>>>>>>>>> For more options, visit this group at
>>>>>>>>> http://groups.google.com/**group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> 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 algogeeks+unsubscribe@
>>>>>>> **googlegroups.com .
>>>>>>> For more options, visit this group at http://groups.google.com/**
>>>>>>> group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>  --
>>>>>> 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
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Aditi Garg
>>>>> Undergraduate Student
>>>>> Electronics & Communication Divison
>>>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>>>> Sector 3, Dwarka
>>>>> New Delhi
>>>>>
>>>>>
>>>>>  --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Aditi Garg
>> Undergraduate Student
>> Electronics & Communication Divison
>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>> Sector 3, Dwarka
>> New Delhi
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] array ques

2011-08-14 Thread siddharth srivastava
Hi

On 15 August 2011 00:37, aditya kumar  wrote:

> for(j=0;j {
> if(a[j]==j)
>  return j;
>  else
>  continue ;
> }
>
> this shud also be correct right ??
>


It is a O(n) algo

>
> On Mon, Aug 15, 2011 at 12:31 AM, Akash Mukherjee wrote:
>
>> just my 2 cents  in d binary search, replacing key with mid, ie
>> if(a[mid] > mid)
>> check lower half
>> else upper half
>>
>> should work??
>>
>>
>> On Mon, Aug 15, 2011 at 12:26 AM, aditi garg 
>> wrote:
>>
>>> Given an ordered array A[1…n] with numbers in strictly increasing
>>> order. Find a ‘j’ such that A [j]=j or -1 if no such number exist in
>>> o (log n).
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] matrix question ???!!!!!!!!!!??????????

2011-08-14 Thread siddharth srivastava
On 15 August 2011 00:18, Karthikeyan palani wrote:

> code pls??


implement your code, and if you feel that something is wrong with that, then
we can help you out in improving it


>
>
> On 15 August 2011 00:16, aditya kumar wrote:
>
>> it can be done in O(3n). in worst case one row will have max and anothr
>> row will have min so the third row will be your o/p to print
>>
>>
>> On Mon, Aug 15, 2011 at 12:00 AM, Karthikeyan palani <
>> karthikeyan...@gmail.com> wrote:
>>
>>> sorry O(n^2) s the time complexity
>>>
>>>
>>> On 14 August 2011 23:56, shady  wrote:
>>>
>>>> how can it be O(n) when there are itself n*n elements..
>>>>
>>>> PS : no sharing of code, else the inevitable
>>>>
>>>> On Sun, Aug 14, 2011 at 11:51 PM, Karthikeyan palani <
>>>> karthikeyan...@gmail.com> wrote:
>>>>
>>>>> Given a n x n matrix. .number are randomly placed. .print any one row
>>>>> which doesn’t have min
>>>>> and max elements. Time Complexity : 0(n)
>>>>>
>>>>>
>>>>>
>>>>> if anyone know the code.. pls share!!!
>>>>>
>>>>> --
>>>>> karthikeyankkn
>>>>>
>>>>> --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>  --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> karthikeyankkn
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> karthikeyankkn
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-08-14 Thread siddharth srivastava
On 15 August 2011 00:15, sukran dhawan  wrote:

> do they recruit software engineers for maintainenance?



yes..and major chunk of projects are maintenance only

>
>
> On Mon, Aug 15, 2011 at 12:10 AM, siddharth srivastava <
> akssps...@gmail.com> wrote:
>
>>
>>
>> On 15 August 2011 00:03, sukran dhawan  wrote:
>>
>>> hmmm k
>>
>> or even purely maintenance jobs where you may not get chance to code at
>> all
>>
>>>
>>>
>>> On Sun, Aug 14, 2011 at 11:47 PM, rashmi i  wrote:
>>>
>>>> Infosys and TCS are consultancies. So, the type of job is not fixed. It
>>>> depends on the type of project a client provides, so it may involve variety
>>>> of technologies from C to Java , Perl,etc.
>>>>
>>>>
>>>> On Sun, Aug 14, 2011 at 11:31 PM, sukran dhawan >>> > wrote:
>>>>
>>>>>  can anyone tell me what is the job provided by infosys and tcs?
>>>>> IF they do so much mass recruitment what kinda job the ppl get der?
>>>>>
>>>>> --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> R@$!-!
>>>> "DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS."
>>>>
>>>>  --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>
>>   --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-08-14 Thread siddharth srivastava
On 15 August 2011 00:03, sukran dhawan  wrote:

> hmmm k

or even purely maintenance jobs where you may not get chance to code at all

>
>
> On Sun, Aug 14, 2011 at 11:47 PM, rashmi i  wrote:
>
>> Infosys and TCS are consultancies. So, the type of job is not fixed. It
>> depends on the type of project a client provides, so it may involve variety
>> of technologies from C to Java , Perl,etc.
>>
>>
>> On Sun, Aug 14, 2011 at 11:31 PM, sukran dhawan 
>> wrote:
>>
>>>  can anyone tell me what is the job provided by infosys and tcs?
>>> IF they do so much mass recruitment what kinda job the ppl get der?
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> R@$!-!
>> "DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS."
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread siddharth srivastava
just wondering...is there a standard ans to Q3 ?

On 12 August 2011 23:11, aditi garg  wrote:

> thanks:)
>
>
> On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya  wrote:
>
>> Q.5 . [warning] initialization  makes integer from pointer without
>> a cast.
>>
>>
>> On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek wrote:
>>
>>> well if we write the code simply as
>>> #include
>>>  int main()
>>>  {
>>>  1+2+"4"
>>>  }
>>>
>>> it gives compilation error
>>>
>>> if like this
>>> #include
>>>  int main()
>>>  {
>>>  1+2+"4";
>>>  }
>>>
>>> it will give warning:- no effect of code
>>>
>>>
>>>
>>> if like this
>>> #include
>>>  int main()
>>>  {
>>> int a= 1+2+"4";
>>> printf("%d",a);
>>>  }
>>> it will give error
>>> cannot convert char* to int
>>>
>>>
>>>
>>> On Fri, Aug 12, 2011 at 10:44 PM, aditi garg 
>>> wrote:
>>>
>>>> wats the ans to the 5th ques??
>>>>
>>>>
>>>> On Fri, Aug 12, 2011 at 8:54 PM, gaurav kumar wrote:
>>>>
>>>>> thanks a lot mate .
>>>>>
>>>>>
>>>>> On Aug 11, 4:51 pm, sindhu  wrote:
>>>>> > 1. write a method to find the smallest angle between two hands when
>>>>> > the time is given as input???
>>>>> > 2. given a number between 1 to 1000 convert it to words..example
>>>>> > 235..it should print as two hundred thirty five..
>>>>> > 3. write test cases for elevator in a multistory building..
>>>>> > 4. a chessboard of size 64 blocks is given..a knight can move two n
>>>>> > half moves at a time..how many steps will it take to cover all the 64
>>>>> > blocks...and change the algorithm if the knight moves three and a
>>>>> half
>>>>> > moves.
>>>>> > 5. what will be the result if you execute the following code segment:
>>>>> > 1+2+"4"
>>>>>
>>>>> --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Aditi Garg
>>>> Undergraduate Student
>>>> Electronics & Communication Divison
>>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>>> Sector 3, Dwarka
>>>> New Delhi
>>>>
>>>>
>>>>  --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> **Regards
>>> SAGAR PAREEK
>>> COMPUTER SCIENCE AND ENGINEERING
>>> NIT ALLAHABAD
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Anil Kumar Arya
>> computer science & engineering
>> M.N.N.I.T Allahabad.
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] cisco

2011-08-12 Thread siddharth srivastava
On 12 August 2011 19:20, aditya kumar  wrote:

> is CISCO cuming fr recruitment ?? they are in huge loss and they have
> sacked around 1 employees .


well, this is what Goldman Sachs also did, but they are also doing
recruitment.
No company virtually ever stops recruitment. Sacking is done to fill space
with less expensive resources (though clearly a bad indicator)


>
>
> On Fri, Aug 12, 2011 at 7:18 PM, sukran dhawan wrote:
>
>> can anybody tell abt the interview process in cisco ?
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c question!

2011-08-10 Thread siddharth srivastava
(sizeof(struct)); ??
>

That doesn't makes sense. Size of struct is what ?? you need the size of
your structure with the variables you have declared in it.


>
> cos malloc returns pointer to memory block and nodeptr itself is a pointer
> and you have used nodeptr* further?
>
>
>
> On Tue, Aug 9, 2011 at 6:32 PM, siddharth srivastava 
> wrote:
>
>>  @sidharth: thanks a lot for correcting me :)
>>> @aditya : no. there was some mistake;
>>>
>>> in the code i pasted above it's giving segmentation fault. Is it cause
>>> i'm initializing h without using malloc??
>>> Please throw light on this problem
>>>
>>
>> Pointer points to a location in memory. You can't use h without making h
>> to reference to some area in memory.
>>
>>
>>
>>> And in the following code
>>> char *s;
>>> scanf("%s", s);
>>> why isn't it possible to store a string in s??
>>>
>>> Please explain both concepts.
>>>
>>> --
>>>  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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
>  "People often say that motivation doesn't last. Well, neither does
> bathing - that's why we recommend it daily."
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-08-10 Thread siddharth srivastava
Its completely compiler dependent.
Actually it depends upon how the printf has been implemented.
Generally its a stack based implementation which will give you

4 5 5 5 5

as output.

It was interesting to see your output, have you executed it ? Which compiler
?

On 10 August 2011 19:05, Pratz mary  wrote:

> the evalution starts from right to left bt gets printed from left to right
>
>
> On 10 August 2011 16:14, Naveen Kumar  wrote:
>
>> AFAIK evalution order of parameters in c is compiler dependent.
>>
>> On Wed, Aug 10, 2011 at 4:09 PM, siddharam suresh
>>  wrote:
>> > the evaluation of parameters in printf() done from right to left.
>> >
>> > Thank you,
>> > Siddharam
>> >
>> >
>> > On Wed, Aug 10, 2011 at 4:04 PM, Anubhav Aggarwal <
>> experience...@gmail.com>
>> > wrote:
>> >>
>> >> can anybody explain how its printing
>> >>  4 5 5 4 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@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> algogeeks+unsubscr...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/algogeeks?hl=en.
>> >>
>> >
>> > --
>> > 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
>> > algogeeks+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/algogeeks?hl=en.
>> >
>>
>>
>>
>> --
>> Cheers
>> Naveen Kumar
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> regards Pratima :)
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output?

2011-08-09 Thread siddharth srivastava
my bad..that I didn't notice = (assumed it to be ==)

On 9 August 2011 22:28, SANDEEP CHUGH  wrote:

> it doesn't matter
>
> On Tue, Aug 9, 2011 at 10:25 PM, siddharth srivastava  > wrote:
>
>>
>>
>> On 9 August 2011 22:20, tech rascal  wrote:
>>
>>> #include
>>> int main()
>>> {
>>> char ch;
>>> if((ch=printf("")))
>>> printf("it matters");
>>> else
>>> printf("it doesn't matter");
>>> return 0;
>>> }
>>>
>>>
>> output wud be : It doesn't matter
>>
>
> reason:  in the printf("") ---> this will return null character and assign
> it to ch and null character has ascii value 0
>
> so statement reduces to
>
> if(0)
>
> rest u knw..
>
>
>
>>
>>
>>
>>>
>>> what will b the output??
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output?

2011-08-09 Thread siddharth srivastava
On 9 August 2011 22:25, tech rascal  wrote:

> explanation??
>
>
printf returns the no of characters printed
moreover you have an uninitialized char (with garbage value) so comparison
will always be false



>
> On Tue, Aug 9, 2011 at 10:24 PM, aditi garg wrote:
>
>> it doesnt matter
>>
>> On Tue, Aug 9, 2011 at 10:20 PM, tech rascal wrote:
>>
>>> #include
>>> int main()
>>> {
>>> char ch;
>>> if((ch=printf("")))
>>> printf("it matters");
>>> else
>>> printf("it doesn't matter");
>>> return 0;
>>> }
>>>
>>>
>>> what will b the output??
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Aditi Garg
>> Undergraduate Student
>> Electronics & Communication Divison
>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>> Sector 3, Dwarka
>> New Delhi
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output?

2011-08-09 Thread siddharth srivastava
On 9 August 2011 22:20, tech rascal  wrote:

> #include
> int main()
> {
> char ch;
> if((ch=printf("")))
> printf("it matters");
> else
> printf("it doesn't matter");
> return 0;
> }
>
>
It doesn't matter



>
> what will b the output??
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c question!

2011-08-09 Thread siddharth srivastava
>
> @sidharth: thanks a lot for correcting me :)
> @aditya : no. there was some mistake;
>
> in the code i pasted above it's giving segmentation fault. Is it cause i'm
> initializing h without using malloc??
> Please throw light on this problem
>

Pointer points to a location in memory. You can't use h without making h to
reference to some area in memory.



> And in the following code
> char *s;
> scanf("%s", s);
> why isn't it possible to store a string in s??
>
> Please explain both concepts.
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C++ heap vs stack

2011-08-09 Thread siddharth srivastava
On 9 August 2011 10:32, Mohit Goel  wrote:

>
>
> what the reason behind it how do they differ in functonality..?



Here is a good and short expl:
http://ee.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.8.html

>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c question!

2011-08-09 Thread siddharth srivastava
>
>
>>>
>>> this gives an error. Please explain the concept behind this.
>>>
>>
try using something like this:

#include
#include
typedef struct {
char * a;

}* nodeptr;

main(){
nodeptr h = (nodeptr*)malloc(sizeof(nodeptr*));
h->a="programming";
printf("hi %s\n", h->a);
}


though
typedef struct{
char *a;
} nodeptr;

would be better in terms of readability and understanding.



>
>>>
>>
>> You have used typedef incorrectly
>>
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c question!

2011-08-09 Thread siddharth srivastava
Hi

On 9 August 2011 20:26, programming love wrote:

>   #includetypedef struct {char * a;
> }*nodeptr;
> main(){nodeptr *h;h->a="programming";printf("hi %s\n", h->a);}
>
>
> this gives an error. Please explain the concept behind this.
>
>

You have used typedef incorrectly

>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] wht does this error means

2011-08-06 Thread siddharth srivastava
On 6 August 2011 23:27, jagrati verma  wrote:

> error: stray ‘\342’ in program
>

just to add:
it can also be due to single quotes
If you have copied code from some site having fancy styling, it can be a
reason for the error

>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Header Files

2011-08-06 Thread siddharth srivastava
On 6 August 2011 23:28, aditi garg  wrote:

> I have read that to avoid multiple declaration error we write #pragma
> once in header files or use #ifndef and #def to make sure that the
> header file is included only once...
> i tried running a prog in whch i included stdio.h thrice bt it dint gv
> any error...does dat mean we have #pragma once in every header file??
>


though #pragma once is not a documented standard, so I doubt it would have
been used in stdio.h.
they must be having #ifndef in it

To answer your specific question, yes those headers do have preprocessors to
prevent multiple includes


>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] size -------

2011-08-06 Thread siddharth srivastava
On 6 August 2011 23:27, Nitin  wrote:

> I am also getting 24 bytes but y it is taking it every data type as 8,8,8
> as if we take it alone it is 1 for char and 4 for int and 8 for doble as it
> is giving 24 which means it is setting every data type as 8 bytes.
>

it should be due to 64 bit machine (and I guess an appropriate compiler
suiting the architecture)
btw, what's your system architecture and compiler specifications ?



>
> On Sat, Aug 6, 2011 at 9:28 PM, Aditya Virmani 
> wrote:
>
>> i guess it depends on ur system configuration...for 32 bit
>> machines...respective sizes allocated would be 4,4,8 :giving 16
>> & on 64 bit machines it wud be 8,8,8: giving 24. Correct me if i am wrong.
>>
>>
>> On Sat, Aug 6, 2011 at 9:24 PM, SANDEEP CHUGH wrote:
>>
>>> @ sukran , nitish :
>>> guys, i dnt knw about the output from these online compliers..
>>>
>>>
>>> On Sat, Aug 6, 2011 at 9:20 PM, SANDEEP CHUGH 
>>> wrote:
>>>
>>>>
>>>> @payel : according to u,,starting address cannot be 4.. ok.
>>>> but wat if i hav used the following structure before that structure
>>>>
>>>> struct demo1
>>>> {
>>>> char a;
>>>> int b;
>>>> char c;
>>>>
>>>> }
>>>>
>>>>
>>>> On Sat, Aug 6, 2011 at 9:06 PM, Nitish Garg 
>>>> wrote:
>>>>
>>>>> Why does Ideone https://ideone.com/1Uwxx gives 16?
>>>>>
>>>>> --
>>>>> 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/-/L-zANxDDTUQJ.
>>>>>
>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] address calculation

2011-08-06 Thread siddharth srivastava
On 6 August 2011 23:15, aditi garg  wrote:

> No the ans is 1031 and 20C4...
> i got it btw...thanx :)
>

explain ?

>
>
> On Sat, Aug 6, 2011 at 11:13 PM, Aditya Virmani 
> wrote:
>
>> 1033,2066?
>>
>>
>> On Sat, Aug 6, 2011 at 11:09 PM, aditi garg wrote:
>>
>>> CHAR A[10][15] AND INT B[10][15] IS DEFINED
>>> WHAT'S THE ADDRESS OF A[3][4] AND B[3][4]
>>> IF ADDRESS OF A IS OX1000 AND B IS 0X2000
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Paypal interview Questions

2011-08-06 Thread siddharth srivastava
Hi

On 6 August 2011 12:08, swetha rahul  wrote:

> Hi,
>
> Q.No:1
>  what is wrong here
> void foo(int x=10,int y)
> how compiler will treat it??


compiler error
to get it working y should also have a default value.


>
> and what happen here
>  void foo(int x=10,int y=20)
>
>
will work fine


> Q.No:2
> How to remove duplicate elements from an array in just one pass.. Take care
> of time and space complexity..
>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] size -------

2011-08-06 Thread siddharth srivastava
On 6 August 2011 21:50, saurabh singh  wrote:

> padding should depend on m/c size according to my logic



machine as well as the compiler

>
>
> On Sat, Aug 6, 2011 at 9:32 PM, sukran dhawan wrote:
>
>> it all depends on word size of the computer.since int by default is equal
>> to word size and double usually occupies 8 bytes all of these start from a
>> new memory boundary.so if only part of it filled rest of them will be
>> holes.tat is the whole reason why structures cannot be compared for equality
>> and its a syntax error
>>
>> On Sat, Aug 6, 2011 at 9:28 PM, Aditya Virmani 
>> wrote:
>>
>>> i guess it depends on ur system configuration...for 32 bit
>>> machines...respective sizes allocated would be 4,4,8 :giving 16
>>> & on 64 bit machines it wud be 8,8,8: giving 24. Correct me if i am
>>> wrong.
>>>
>>>
>>> On Sat, Aug 6, 2011 at 9:24 PM, SANDEEP CHUGH 
>>> wrote:
>>>
>>>> @ sukran , nitish :
>>>> guys, i dnt knw about the output from these online compliers..
>>>>
>>>>
>>>> On Sat, Aug 6, 2011 at 9:20 PM, SANDEEP CHUGH 
>>>> wrote:
>>>>
>>>>>
>>>>> @payel : according to u,,starting address cannot be 4.. ok.
>>>>> but wat if i hav used the following structure before that structure
>>>>>
>>>>> struct demo1
>>>>> {
>>>>> char a;
>>>>> int b;
>>>>> char c;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>> On Sat, Aug 6, 2011 at 9:06 PM, Nitish Garg 
>>>>> wrote:
>>>>>
>>>>>> Why does Ideone https://ideone.com/1Uwxx gives 16?
>>>>>>
>>>>>> --
>>>>>> 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/-/L-zANxDDTUQJ.
>>>>>>
>>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>  --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
> MNNIT ALLAHABAD
>
>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] difference between the two

2011-08-06 Thread siddharth srivastava
On 6 August 2011 21:50, siddharth srivastava  wrote:

> Hi
>
> On 6 August 2011 20:20, SANDEEP CHUGH  wrote:
>
>> padding wud be between int & char..(for ur last case)
>>
>> now u said if it starts at 4 , still the block will be 8 (size of double),
>> that is 7 bytes to be padded..
>>
>> so double element of structure would be starting at 4 + char(1) + 7 byte
>> padding  ==12
>>
>> but 12 is not a multiple of 8..
>>
>
> the whole concept is about the alignment and word size.
> If word size is 4( 32 bit m/c) then the memory allocation would start at a
> multiple of 4 and if it is 8 , then the memory allocation would start at a
> multiple of 8.
> Moreover, the explaination I gave above hold for 64 bit architecture.
> For 32 bit architecture a double is 8 bytes aligned
>
just a correction:
on gcc, double is 4 bytes aligned


> but the word size is 4 bytes, so for a structure like this
>
>  struct a
> {
> double d;
> int i;
> }
>
> the size would be 12 (on 32 bit) and 16 (on 64 bit)
>

the result are for linux(gcc) system

>
>
>> so there is a problem??
>>
>>
>>
>>
>>
>>
>> On Sat, Aug 6, 2011 at 8:06 PM, siddharth srivastava > > wrote:
>>
>>>  but if the reference is not 0 .. if it wud have been 4 then for tht case
>>>> tell me do we really need that 7 bytes??
>>>>
>>>
>>> yes, because in any case the block would be of 8 bytes only
>>> so even if you start at 4, you would have only 7 bytes left in that
>>> location for the next variable(which in this case is a double of 8 bytes, so
>>> the allocation would start at the 8th byte from the first location)
>>>
>>> Look at the following stack: X represents occupied memory, - represents
>>> the memory to be padded (in bytes)
>>>
>>> X - - - - - - -
>>> 
>>>  - - - -
>>>
>>> So, first char occupies 1 byte, then there are only 7 bytes left at that
>>> index, which are not enough for a double to be stored (got my point)
>>> Moreover, if you had
>>> struct a{
>>> char c;
>>> int i;
>>> double d;
>>> }
>>>
>>> then the size would have been 16
>>>
>>> as after allocating a char, there was enough space for an int to be
>>> stored. (just not sure if padding would be after int or between int and
>>> char)
>>>
>>>
>>>
>>>
>>>>
>>>> and yeah it is dependent on compiler size..
>>>> if u compile this snippet
>>>>
>>>> struct demo
>>>> {
>>>>char   c;
>>>>double  d;
>>>>int s;
>>>>
>>>>> }
>>>>
>>>>
>>>> in turbo c , its giving 11,, that means compiler nt doing padding at all
>>>> in turbo c..
>>>>
>>>> On Sat, Aug 6, 2011 at 7:50 PM, siddharth srivastava <
>>>> akssps...@gmail.com> wrote:
>>>>
>>>>> Hi Sandeep
>>>>>
>>>>> On 6 August 2011 19:16, SANDEEP CHUGH  wrote:
>>>>>
>>>>>> take this case
>>>>>>
>>>>>> struct demo
>>>>>> {
>>>>>>char   c;
>>>>>>double  d;
>>>>>>int s;
>>>>>>
>>>>>>> }
>>>>>>
>>>>>>
>>>>>> what wud be the size??
>>>>>>
>>>>>>
>>>>>> solution is 24 according to following:-->
>>>>>>
>>>>>> char (1) + 7 byte padding +double(8)+int(4)+ 4 byte padding
>>>>>>
>>>>>>
>>>>>> suppose address starts at 4..
>>>>>>
>>>>>>  i just wanna ask .. why there is 7 byte padding.. because just after
>>>>>> 3 bytes padding after char we are getting address that is multiple of 
>>>>>> 8(size
>>>>>> of largest)..
>>>>>>
>>>>>
>>>>>
>>>>> after 3 bytes of padding i.e. the 4th byte(if reference is 0), is not a
>>>>> multiple of 8.
>>>>> Moreover, try understanding with this example:
>>>>> visualize a stack of memory with each location having the size of the
>>>>> largest sized variable in the structure.
>>>>> So in your case, each stack ele

Re: [algogeeks] difference between the two

2011-08-06 Thread siddharth srivastava
Hi

On 6 August 2011 20:20, SANDEEP CHUGH  wrote:

> padding wud be between int & char..(for ur last case)
>
> now u said if it starts at 4 , still the block will be 8 (size of double),
> that is 7 bytes to be padded..
>
> so double element of structure would be starting at 4 + char(1) + 7 byte
> padding  ==12
>
> but 12 is not a multiple of 8..
>

the whole concept is about the alignment and word size.
If word size is 4( 32 bit m/c) then the memory allocation would start at a
multiple of 4 and if it is 8 , then the memory allocation would start at a
multiple of 8.
Moreover, the explaination I gave above hold for 64 bit architecture.
For 32 bit architecture a double is 8 bytes aligned but the word size is 4
bytes, so for a structure like this

struct a
{
double d;
int i;
}

the size would be 12 (on 32 bit) and 16 (on 64 bit)


> so there is a problem??
>
>
>
>
>
>
> On Sat, Aug 6, 2011 at 8:06 PM, siddharth srivastava 
> wrote:
>
>>  but if the reference is not 0 .. if it wud have been 4 then for tht case
>>> tell me do we really need that 7 bytes??
>>>
>>
>> yes, because in any case the block would be of 8 bytes only
>> so even if you start at 4, you would have only 7 bytes left in that
>> location for the next variable(which in this case is a double of 8 bytes, so
>> the allocation would start at the 8th byte from the first location)
>>
>> Look at the following stack: X represents occupied memory, - represents
>> the memory to be padded (in bytes)
>>
>> X - - - - - - -
>> 
>>  - - - -
>>
>> So, first char occupies 1 byte, then there are only 7 bytes left at that
>> index, which are not enough for a double to be stored (got my point)
>> Moreover, if you had
>> struct a{
>> char c;
>> int i;
>> double d;
>> }
>>
>> then the size would have been 16
>>
>> as after allocating a char, there was enough space for an int to be
>> stored. (just not sure if padding would be after int or between int and
>> char)
>>
>>
>>
>>
>>>
>>> and yeah it is dependent on compiler size..
>>> if u compile this snippet
>>>
>>> struct demo
>>> {
>>>char   c;
>>>double  d;
>>>int s;
>>>
>>>> }
>>>
>>>
>>> in turbo c , its giving 11,, that means compiler nt doing padding at all
>>> in turbo c..
>>>
>>> On Sat, Aug 6, 2011 at 7:50 PM, siddharth srivastava <
>>> akssps...@gmail.com> wrote:
>>>
>>>> Hi Sandeep
>>>>
>>>> On 6 August 2011 19:16, SANDEEP CHUGH  wrote:
>>>>
>>>>> take this case
>>>>>
>>>>> struct demo
>>>>> {
>>>>>char   c;
>>>>>double  d;
>>>>>int s;
>>>>>
>>>>>> }
>>>>>
>>>>>
>>>>> what wud be the size??
>>>>>
>>>>>
>>>>> solution is 24 according to following:-->
>>>>>
>>>>> char (1) + 7 byte padding +double(8)+int(4)+ 4 byte padding
>>>>>
>>>>>
>>>>> suppose address starts at 4..
>>>>>
>>>>>  i just wanna ask .. why there is 7 byte padding.. because just after
>>>>> 3 bytes padding after char we are getting address that is multiple of 
>>>>> 8(size
>>>>> of largest)..
>>>>>
>>>>
>>>>
>>>> after 3 bytes of padding i.e. the 4th byte(if reference is 0), is not a
>>>> multiple of 8.
>>>> Moreover, try understanding with this example:
>>>> visualize a stack of memory with each location having the size of the
>>>> largest sized variable in the structure.
>>>> So in your case, each stack element is ought to be 8 bytes (due to
>>>> double)
>>>> Now, when first character is allocated, we have only 7 bytes left at
>>>> that location in the stack, hence double has to be allocated in the next
>>>> location.i.e. 2nd stack element and 8th byte (again reference 0)
>>>>
>>>> So total size is ought to be occupied is 24 in this case
>>>>
>>>>
>>>> say if you had this declaration:
>>>> struct a
>>>> {
>>>> char a;
>>>> double d;
>>>> int c;
>>>> int e;
>>>> }
>>>>
>>>> 

Re: [algogeeks] difference between the two

2011-08-06 Thread siddharth srivastava
>
>  but if the reference is not 0 .. if it wud have been 4 then for tht case
> tell me do we really need that 7 bytes??
>

yes, because in any case the block would be of 8 bytes only
so even if you start at 4, you would have only 7 bytes left in that location
for the next variable(which in this case is a double of 8 bytes, so the
allocation would start at the 8th byte from the first location)

Look at the following stack: X represents occupied memory, - represents the
memory to be padded (in bytes)

X - - - - - - -

 - - - -

So, first char occupies 1 byte, then there are only 7 bytes left at that
index, which are not enough for a double to be stored (got my point)
Moreover, if you had
struct a{
char c;
int i;
double d;
}

then the size would have been 16

as after allocating a char, there was enough space for an int to be stored.
(just not sure if padding would be after int or between int and char)




>
> and yeah it is dependent on compiler size..
> if u compile this snippet
>
> struct demo
> {
>char   c;
>double  d;
>int s;
>
>> }
>
>
> in turbo c , its giving 11,, that means compiler nt doing padding at all in
> turbo c..
>
> On Sat, Aug 6, 2011 at 7:50 PM, siddharth srivastava 
> wrote:
>
>> Hi Sandeep
>>
>> On 6 August 2011 19:16, SANDEEP CHUGH  wrote:
>>
>>> take this case
>>>
>>> struct demo
>>> {
>>>char   c;
>>>double  d;
>>>int s;
>>>
>>>> }
>>>
>>>
>>> what wud be the size??
>>>
>>>
>>> solution is 24 according to following:-->
>>>
>>> char (1) + 7 byte padding +double(8)+int(4)+ 4 byte padding
>>>
>>>
>>> suppose address starts at 4..
>>>
>>>  i just wanna ask .. why there is 7 byte padding.. because just after 3
>>> bytes padding after char we are getting address that is multiple of 8(size
>>> of largest)..
>>>
>>
>>
>> after 3 bytes of padding i.e. the 4th byte(if reference is 0), is not a
>> multiple of 8.
>> Moreover, try understanding with this example:
>> visualize a stack of memory with each location having the size of the
>> largest sized variable in the structure.
>> So in your case, each stack element is ought to be 8 bytes (due to double)
>> Now, when first character is allocated, we have only 7 bytes left at that
>> location in the stack, hence double has to be allocated in the next
>> location.i.e. 2nd stack element and 8th byte (again reference 0)
>>
>> So total size is ought to be occupied is 24 in this case
>>
>>
>> say if you had this declaration:
>> struct a
>> {
>> char a;
>> double d;
>> int c;
>> int e;
>> }
>>
>> then too size would have been 24 as after allocation of int c, we still
>> have 4 bytes in the same location which are then occupied by e (and were
>> padded in previous case)
>>
>> Let me know, if I am not clear.
>>
>> @All
>> Is it really architecture dependent (32 bit or 64 bit) ?
>>
>>
>>
>>>
>>> can u please tell me??
>>>
>>>
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>  --
>> 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
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] difference between the two

2011-08-06 Thread siddharth srivastava
Hi Sandeep

On 6 August 2011 19:16, SANDEEP CHUGH  wrote:

> take this case
>
> struct demo
> {
>char   c;
>double  d;
>int s;
>
>> }
>
>
> what wud be the size??
>
>
> solution is 24 according to following:-->
>
> char (1) + 7 byte padding +double(8)+int(4)+ 4 byte padding
>
>
> suppose address starts at 4..
>
>  i just wanna ask .. why there is 7 byte padding.. because just after 3
> bytes padding after char we are getting address that is multiple of 8(size
> of largest)..
>


after 3 bytes of padding i.e. the 4th byte(if reference is 0), is not a
multiple of 8.
Moreover, try understanding with this example:
visualize a stack of memory with each location having the size of the
largest sized variable in the structure.
So in your case, each stack element is ought to be 8 bytes (due to double)
Now, when first character is allocated, we have only 7 bytes left at that
location in the stack, hence double has to be allocated in the next
location.i.e. 2nd stack element and 8th byte (again reference 0)

So total size is ought to be occupied is 24 in this case


say if you had this declaration:
struct a
{
char a;
double d;
int c;
int e;
}

then too size would have been 24 as after allocation of int c, we still have
4 bytes in the same location which are then occupied by e (and were padded
in previous case)

Let me know, if I am not clear.

@All
Is it really architecture dependent (32 bit or 64 bit) ?



>
> can u please tell me??
>
>
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] HOW GARBAGE COLLECTOR WORKS IN JAVA

2011-07-30 Thread siddharth srivastava
Hi Vaibhav

On 30 July 2011 23:40, vaibhav shukla  wrote:

> please give a glimps of how garbage collection is done in java.
> how *System.gc()*  works ?
>

 Please do not use ALL CAPS in subject line. It is a bit scary :)

>
> --
>   best wishes!!
> Vaibhav
>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] ADULT SEX PHOTOS

2011-04-15 Thread siddharth srivastava
Unexpected but most of us have quoted the spam in our replies :-)

Well, I guess the moderator is reading and would take an action soon

-- 
Regards
Siddharth Srivastava

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Prime Numbers

2011-01-26 Thread siddharth srivastava
@rahul, juver++,sankalp

Though this can be solved using incrementing the range in sieve. But due to
this incremental approach how much the efficiency can be improved, any
guesses :)

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Prime Numbers

2011-01-26 Thread siddharth srivastava
Hey Dave

On 25 January 2011 18:17, Dave  wrote:

> The most efficient approach is to google "millionth prime number" and
> select the first hit.
>
> Good one. But it was asked to me in an interview.
The trivial approach would be to check for every number to be a prime an
continue till
the count of prime no reaches 1 million.

Another approach according to me would be to use gcd approach for the same
but it doesn't guarantees the order of primes I guess (correct me if I am
wrong)

The interviewer still wanted a better approach. I know of better approaches
if a range is given, but what to do in this case.


> Dave
>
> On Jan 25, 6:00 am, siddharth srivastava  wrote:
> > Hi
> >
> > Its an easy one but still I am looking for the most efficient approach.
> >
> > Find first 1 million prime numbers.
> >
> > --
> > Siddharth Srivastava
> >
> > When you have learned to snatch the error code from the trap frame, it
> will
> > be time for you to leave.
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] NAGARRO CODING QUES............

2011-01-25 Thread siddharth srivastava
thanks

On 25 January 2011 01:50, Balaji Ramani  wrote:

> We do not compare to a value. We compare each pair to current min and if
> the absolute sum of the current pair is less than the current min, we make
> the current pair sum the current min.
>
> Do checkout this link: http://geeksforgeeks.org/?p=4034
>
> Thanks,
> Balaji.
>
> On Tue, Jan 25, 2011 at 9:35 AM, siddharth srivastava  > wrote:
>
>> Hi
>>
>> On 24 January 2011 12:55, Balaji Ramani wrote:
>>
>>> @Siddharth
>>>
>>> However if the input range is unknown, it can be solved through an
>>> entirely different approach after sorting and then using two pointers moving
>>> either side from the positive-negative boundary. O(nlogn) + O(n)  = O(nlogn)
>>>
>>
>> yes I meant this case only. But to what value would you compare if you
>> want the sum to be closest to zero and lets say that  none of the elements
>> sum up to zero.
>>
>>>
>>> Thanks,
>>> Balaji.
>>>
>>>
>>> On Mon, Jan 24, 2011 at 11:03 PM, siddharth srivastava <
>>> akssps...@gmail.com> wrote:
>>>
>>>> If the same question is modified as:
>>>> Find two numbers whose sum is closest to zero in the given array.
>>>>
>>>>
>>>> On 24 January 2011 16:08, juver++  wrote:
>>>>
>>>>> Its name is meet-in-the-middle technique.
>>>>>
>>>>> --
>>>>> 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
>>>>> algogeeks+unsubscr...@googlegroups.com
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Siddharth Srivastava
>>>>
>>>> When you have learned to snatch the error code from the trap frame, it
>>>> will be time for you to leave.
>>>>
>>>> --
>>>> 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
>>>> algogeeks+unsubscr...@googlegroups.com
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Siddharth Srivastava
>>
>> When you have learned to snatch the error code from the trap frame, it
>> will be time for you to leave.
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Prime Numbers

2011-01-25 Thread siddharth srivastava
Hi

Its an easy one but still I am looking for the most efficient approach.

Find first 1 million prime numbers.


-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] NAGARRO CODING QUES............

2011-01-24 Thread siddharth srivastava
Hi

On 24 January 2011 12:55, Balaji Ramani  wrote:

> @Siddharth
>
> However if the input range is unknown, it can be solved through an entirely
> different approach after sorting and then using two pointers moving either
> side from the positive-negative boundary. O(nlogn) + O(n)  = O(nlogn)
>

yes I meant this case only. But to what value would you compare if you want
the sum to be closest to zero and lets say that  none of the elements sum up
to zero.

>
> Thanks,
> Balaji.
>
>
> On Mon, Jan 24, 2011 at 11:03 PM, siddharth srivastava <
> akssps...@gmail.com> wrote:
>
>> If the same question is modified as:
>> Find two numbers whose sum is closest to zero in the given array.
>>
>>
>> On 24 January 2011 16:08, juver++  wrote:
>>
>>> Its name is meet-in-the-middle technique.
>>>
>>> --
>>> 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
>>> algogeeks+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Siddharth Srivastava
>>
>> When you have learned to snatch the error code from the trap frame, it
>> will be time for you to leave.
>>
>> --
>> 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
>> algogeeks+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] NAGARRO CODING QUES............

2011-01-24 Thread siddharth srivastava
If the same question is modified as:
Find two numbers whose sum is closest to zero in the given array.

On 24 January 2011 16:08, juver++  wrote:

> Its name is meet-in-the-middle technique.
>
> --
> 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
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] GOOGLE SUMMER OF CODE

2010-11-22 Thread siddharth srivastava
Hi

On 22 November 2010 08:14, ankit sablok  wrote:
> WHEN IS GOOGLE SUMMER OF CODE 2011 BEGINING AND HOW CAN WE APPLY FOR
> IT
Next year

> AND WHAT ARE THE ELIGIBILITY CRITERIA FOR THE APPLICATION.
you must be a student

> PLEASE HELP ME OUT WITH THIS APPLICATION PROCEDURE...

Kindly refer to the faqs or ask at #gsoc(freenode) for real time feedback
>
> THNXX IN ADVANCE
>
> ANKIT SABLOK
> B.TECH
> COMPUTER SCIENCE AND ENGG
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to 
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/algogeeks?hl=en.
>
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it
will be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Next Input Number

2010-11-17 Thread siddharth srivastava
On 17 November 2010 10:42, Dave  wrote:
> @Siddharth: Try this ("nnwtsnoob" = "next number with the same number
> of one bits"):
>
> unsigned nnwtsnoob(unsigned x)
> {
>    return (x+(x&(-x)))|(((x^(x+(x&(-x>>2)/(x&(-x)));
> }
>
> For the explanation/justification, see
> http://groups.google.com/group/programming-puzzles/msg/3a05b3c8b4042d5b.
>

Thanks a lot Dave

> Dave
>
> On Nov 16, 12:18 pm, siddharth srivastava  wrote:
>> Input a number and then find the next higher number
>> such that for both the number (inputted and the next higher
>> number)
>> in binary representation contains equal number os ones.
>> Example:
>> Input:3(0011)
>> Ouput:5(0101)
>>
>> --
>> Siddharth Srivastava
>>
>> When you have learned to snatch the error code from the trap frame, it
>> will be time for you to leave.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to 
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/algogeeks?hl=en.
>
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it
will be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Next Input Number

2010-11-16 Thread siddharth srivastava
Input a number and then find the next higher number
such that for both the number (inputted and the next higher
number)
in binary representation contains equal number os ones.
Example:
Input:3(0011)
Ouput:5(0101)


--
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it
will be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Google Interview Question-Snake and Ladder Design

2010-09-14 Thread siddharth srivastava
Hi

On 14 September 2010 13:33, bittu  wrote:

> #include
> #include
> #include
> #include
>  ///O(N^2) solution  Does solution exits
> in O(n) or (nlogn)..? reply me sum1 git dis..
> //i will post analysis of dsi program later
> int turn, square;
> long game, totalgames;
> int seed;
> int chutehit[10], ladderhit[9];
> float RunningTurnTotal;
> float average;
>
> char reply;
>
>
> void ChuteStats()
> {printf("Chute and Ladder Statistics:\n\n");
>
> printf("Chute0: %d Ladder0: %d\n", chutehit[0], ladderhit[0]);
> printf("Chute1: %d Ladder1: %d\n", chutehit[1], ladderhit[1]);
> printf("Chute2: %d Ladder2: %d\n", chutehit[2], ladderhit[2]);
> printf("Chute3: %d Ladder3: %d\n", chutehit[3], ladderhit[3]);
> printf("Chute4: %d Ladder4: %d\n", chutehit[4], ladderhit[4]);
> printf("Chute5: %d Ladder5: %d\n", chutehit[5], ladderhit[5]);
> printf("Chute6: %d Ladder6: %d\n", chutehit[6], ladderhit[6]);
> printf("Chute7: %d Ladder7: %d\n", chutehit[7], ladderhit[7]);
> printf("Chute8: %d Ladder8: %d\n", chutehit[8], ladderhit[8]);
> printf("Chute9: %d\n", chutehit[9]);
> }
>
>
>
> int main()
> {
> printf("Welcome to the Chutes and Ladders simulation \n");
> printf("...\n");
> srand(1);
>
> //printf("How many games would you like me to run? __ ");
> //scanf("%i",&totalgames);
> ///printf("\n You have chosen to run %i games... thank you! \n",
> totalgames);
>
> totalgames+=2;
> RunningTurnTotal=0.0;
>game=1;
>do{
>
>turn=0;
>square=0; /** Reset game **/
> do   /** Begin game loop
> **/
>
>{
>++turn;
>RunningTurnTotal = RunningTurnTotal + 1;
>
>square = square + 1 + rand()%6;   /** Spin and move
> **/
>
>printf("square =%d \n",square);
>
>if (square == 1) {square=23; ++ladderhit[0];} /** Ladders?
> **/
>if (square == 4) {square=14; ++ladderhit[1];}
>if (square == 9) {square=31; ++ladderhit[2];}
>if (square == 21) {square=42; ++ladderhit[3];}
>if (square == 28) {square=84; ++ladderhit[4];}
>if (square == 36) {square=44; ++ladderhit[5];}
>if (square == 51) {square=67; ++ladderhit[6];}
>if (square == 71) {square=91; ++ladderhit[7];}
>if (square == 80) {square=100;++ladderhit[8];}/// so when 80
> comes raech to our goal exit
>
>
>
>if (square == 98) {square=78; ++chutehit[0];} /** Chutes ?
> **/
>if (square == 95) {square=75; ++chutehit[1];}
>if (square == 93) {square=73; ++chutehit[2];}
>if (square == 87) {square=24; ++chutehit[3];}
>if (square == 62) {square=19; ++chutehit[4];}
>if (square == 64) {square=60; ++chutehit[5];}
>if (square == 56) {square=53; ++chutehit[6];}
>if (square == 49) {square=11; ++chutehit[7];}
>if (square == 48) {square=26; ++chutehit[8];}
>if (square == 16) {square=6; ++chutehit[9];}
>
>   } while (square<100);//terminate if random no. is > 100
>
>   printf("\n\n Game over after %d turns\n", turn);
>   printf("\nSimulation complete... beginning statistical
> analysis...\n\n");
>  printf("Total number of games played: %d \n", game);
>  printf("Total number of turns: %f \n", RunningTurnTotal);
>  average = RunningTurnTotal / game;
>  printf("Avg number of turns per game: %f \n", average);
>  printf("\n");
>  ChuteStats();
>  printf("\n");
>
> ++game;
> printf("\n\n Would you like to run the simulation again?
> (1=Yes)...");
> scanf("%i",&reply);
> if(reply==1)//e.g. reply==1
> totalgames+=1;
> else
> exit(0);// exit
>
>
>  } while (game
>
>
> getch();
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
Can you please write an algo for your program ?

-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Explain

2010-09-11 Thread siddharth srivastava
On 10 September 2010 16:25, saurabh agrawal  wrote:

> Thanks a lot umesh...but still i am in confusion that:
>
> after first processing : "A is replaced by B"
> after second proecessing " B is replaced by A"
> then why again this A is not being replaced by #define A macro..
> why it is not going in an infinite loop...

because they are replaced before compile time and that to only once.(top
down order)


> because i think there is no fiexed order of execution of the macro..
> even if you change the order in which macros are defined will make no
> effect...
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Finding latitude and longitude

2010-07-15 Thread siddharth srivastava
Hi

On 15 July 2010 07:37, Tech Id  wrote:

> This seems to be asked in context of google maps.
>

I asked in terms of OSM.

>
> While drawing map at a particular zoom level, ratio of map-area-on-
> screen and shown-latitudes/longitudes-area is known.
> So, x meters can be converted to latitiude/longitude difference easily
> by this ratio.
>

would it change then ?


>
>
> On Jul 15, 12:59 pm, siddharth srivastava  wrote:
> > Hi
> >
> > If I have a (latitude, langitude) as well as pixel positions of those
> > locations, then how can (longitude, latitude) or pixel coordinates of a
> > point x metres away can be found ?
> >
> > If this information is not enough, what else information might be
> required ?
> >
> > --
> > Siddharth Srivastava
> >
> > When you have learned to snatch the error code from the trap frame, it
> will
> > be time for you to leave.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Finding latitude and longitude

2010-07-15 Thread siddharth srivastava
Hi

If I have a (latitude, langitude) as well as pixel positions of those
locations, then how can (longitude, latitude) or pixel coordinates of a
point x metres away can be found ?

If this information is not enough, what else information might be required ?

-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] point lying inside or not

2010-07-02 Thread siddharth srivastava
Hi

I hace a similar problem. The above algorithm works well, but how can we
determine which side it intersects ?

On 1 July 2010 21:30, sharad kumar  wrote:

> @jalaj ur method fail when it is lying on the corner
> plzz consider case for that also
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Project on finding an optimal route given a map.

2010-07-01 Thread siddharth srivastava
Hi

On 28 June 2010 23:01, Abhishek Sharma  wrote:

> @senthil: thanks for the interest.. I did that purposely..(just wanted to
> see if any1 is interested or not).. here are the details...
>
> I have a map..of a small area (say a college campus).. in
> OSM(openstreetmap) format or it could also be in kml (google map) format..
> Now the application is supposed to take two points on the map as input and
> display the optimal/shortest route between them..
> For ex: consider any college campus.. user enters ITY dept as the source
> and CSE Dept as the destination.. then our application is supposed to
> display the shortest/optimal path.
> We can also take into account the modee of transport..
> Right now.. I am going through the OSM maps.. my idea is to classify the
> map into nodes, ways etc.. then applying the algorithm to find the shortest
> path..
> The problem which i am facing is to classify the map into nodes, ways,
> finding out the distance between each node..
> some of you might be having a better idea in implementing this... I request
> you to share it here..
>

Have you looked at Open Route Service ?  I think it would solve most of your
problem. If it doesn't please elaborate what are its deficiencies or
drawbacks.



>
> Guys we have discussed lot of algos here.. but this requires the
> application of whatever we have learned...so please come forward and lets
> implement this...
> hoping for a positive response...
>
> Regards,
> Abhishek
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Suggest computationally efficient method

2010-06-16 Thread siddharth srivastava
Hi

On a screen coordinate system(800 x 600), we have the current location(both
pixel coordinates and geogaphical coordinates (latitude and longitude)) and
the direction of movement (angle in degrees with respect to north) of a
moving object( say gps device).
What is the best way to determine the coordinates of the point on the screen
border in the direction of movement ?

Ultimate aim is to calculate the time required to reach the border if the
object is assumed to be moving in the direction at that instant.


-- 
Siddharth Srivastava

When you have learned to snatch the error code from the trap frame, it will
be time for you to leave.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Best method to choose a quadrant

2010-06-15 Thread siddharth srivastava
I have this code snippet:
This code snippet defines a boundary coordinates on the screen wrt to the
center(of the screen).

if( x < x_center )
x_border = x_center - x_shift;
else
x_border = x_center + x_shift;

if( y < y_center )
y_border = y_center - y_shift;
else
y_border = y_center + y_shift;

//x_shift and y_shift are constants.

What is the best possible way to determine in which quadrant( wrt to the
center) the point (x,y) lies ?


Siddharth Srivastava

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] 400!

2010-05-03 Thread siddharth srivastava
But is there any way to accomplish this without an array ? Even for 100!.

On 2 May 2010 06:15, Prasoon Mishra  wrote:

> I think challenge here is not the Execution time, but the storage. 300 ! or
> 400! should generally go beyond the storage capabilities of long long ints
> in cpp.
> @ Rohit Saraf: Hence, I don't know if even tail recursion will ultimately
> be able to store the output.
> I think Rajesh Patidar's answer fits the bill well, in terms of storage.
>
>
> On Sun, May 2, 2010 at 2:23 PM, vignesh radhakrishnan <
> rvignesh1...@gmail.com> wrote:
>
>> I agree with abhijith. But given some very large x for which i would have
>> to find factorial.
>> I would either
>> (i) use gmp in cpp or BigInteger or java if its not a lab exercise or an
>> interview
>> (ii) use simple brute multiplication algorithm.
>> The second approach requires
>>  (a) The no. of digits in n! for making storage available
>>  (b) The calculation itself which I would brute force
>>
>> References:
>>
>> http://inder-gnu.blogspot.com/2009/08/find-number-of-digits-in-factorial-of.html
>>
>> http://stackoverflow.com/questions/1113167/can-one-know-how-large-a-factorial-would-be-before-calculating-it
>> http://delphiforfun.org/programs/big_factorials.htm
>>
>>
>>
>> On 2 May 2010 13:59, Rohit Saraf  wrote:
>>
>>> google it... u will gt it
>>>
>>> i am on mobile... cannot explain now..
>>>
>>> On 5/2/10, divya jain  wrote:
>>> > wat is tail recursion plz explan in detail
>>> >
>>> > On 2 May 2010 08:15, Rohit Saraf  wrote:
>>> >
>>> >> @divya use tail recursion and rest should be fine..
>>> >>
>>> >> --
>>> >> --
>>> >> Rohit Saraf
>>> >> Second Year Undergraduate,
>>> >> Dept. of Computer Science and Engineering
>>> >> IIT Bombay
>>> >> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>> <http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>> >>
>>> >> --
>>> >> You received this message because you are subscribed to the Google
>>> Groups
>>> >> "Algorithm Geeks" group.
>>> >> To post to this group, send email to algoge...@googlegroups.com.
>>> >> To unsubscribe from this group, send email to
>>> >> algogeeks+unsubscr...@googlegroups.com
>>> 
>>> >
>>> >> .
>>> >> For more options, visit this group at
>>> >> http://groups.google.com/group/algogeeks?hl=en.
>>> >>
>>> >>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Algorithm Geeks" group.
>>> > To post to this group, send email to algoge...@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> > algogeeks+unsubscr...@googlegroups.com
>>> .
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/algogeeks?hl=en.
>>> >
>>> >
>>>
>>>
>>> --
>>> --
>>> Rohit Saraf
>>> Second Year Undergraduate,
>>> Dept. of Computer Science and Engineering
>>> IIT Bombay
>>> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algoge...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>
>>
>> --
>> There are two kinds of people. Those who care for others and The others
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Siddharth Srivastava

Human Knowledge is for all

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Rabin Karp

2010-04-19 Thread siddharth srivastava
Can anyone help out in implementing Rabin Karp Algorithm ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Binary tree and optimal code

2010-04-01 Thread Siddharth Srivastava
Can anyone explain (or provide relevant link) of how a non complete
binary tree cannot correspond to an optimal prefix code ?
Do we have to give some sort of contradictory proof ?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.