On Mon, Aug 8, 2011 at 11:18 AM, <algogeeks+nore...@googlegroups.com> wrote:

>   Today's Topic Summary
>
> Group: http://groups.google.com/group/algogeeks/topics
>
>    - amazon question <#131a7eff78fc9b31_group_thread_0> [1 Update]
>    - Amazon Puzzle <#131a7eff78fc9b31_group_thread_1> [2 Updates]
>    - nlogn, in-place, iterative 
> mergesort?<#131a7eff78fc9b31_group_thread_2>[2 Updates]
>    - realloc and malloc <#131a7eff78fc9b31_group_thread_3> [1 Update]
>    - OT- Latest C++ primer edition. <#131a7eff78fc9b31_group_thread_4> [1
>    Update]
>    - Probability Puzzle <#131a7eff78fc9b31_group_thread_5> [5 Updates]
>    - MICROSOFT INTERVIEW QUESTIONS faced by my frenz nd 
> me<#131a7eff78fc9b31_group_thread_6>[2 Updates]
>    - Sum from array <#131a7eff78fc9b31_group_thread_7> [2 Updates]
>    - max product! <#131a7eff78fc9b31_group_thread_8> [1 Update]
>    - max product <#131a7eff78fc9b31_group_thread_9> [3 Updates]
>    - AKAMAI and NETAPP ?? <#131a7eff78fc9b31_group_thread_10> [1 Update]
>    - C question.. increment decrement 
> operator..<#131a7eff78fc9b31_group_thread_11>[4 Updates]
>
>   Topic: amazon 
> question<http://groups.google.com/group/algogeeks/t/aeb3379cc36158e5>
>
>    Kamakshii Aggarwal <kamakshi...@gmail.com> Aug 08 11:11AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    what will be the o/p of the following program:
>
>    main()
>    {
>    int ret;
>    ret=fork();
>    ret=fork();
>    ret=fork();
>    ret=fork();
>
>    if(!ret)
>    printf("one");
>    else
>    printf("two");
>    }
>
>
>
>
>
>
>
>
>    --
>    Regards,
>    Kamakshi
>    kamakshi...@gmail.com
>
>
>
>   Topic: Amazon 
> Puzzle<http://groups.google.com/group/algogeeks/t/de38686d7ce3e9b0>
>
>    shady <sinv...@gmail.com> Aug 08 12:01AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    this is one ridiculous puzzle... this must have been asked to some
>    philosophy student by amazon...
>
>
>
>
>
>    Algo Lover <algolear...@gmail.com> Aug 07 10:34PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    What is so ridiculous in this. My doubt it do we have to assume that
>    the left and right directions of both the people are same or can we do
>    without that also ?
>
>
>
>
>   Topic: nlogn, in-place, iterative 
> mergesort?<http://groups.google.com/group/algogeeks/t/26cddeff83e949be>
>
>    DK <divyekap...@gmail.com> Aug 07 01:13PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    @Nitin: In-place merge sorts are not stable (atleast I haven't come
>    across a
>    stable one - you might want to create one as research? ;) ).
>
>    --
>    DK
>
>    http://twitter.com/divyekapoor
>    http://gplus.to/divyekapoor
>    http://www.divye.in
>
>
>
>
>    Nitin Nizhawan <nitin.nizha...@gmail.com> Aug 08 11:03AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    good Joke :)
>
>
>
>
>   Topic: realloc and 
> malloc<http://groups.google.com/group/algogeeks/t/7c06819ca011605c>
>
>    Aman Kumar <amanas...@gmail.com> Aug 07 10:26PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    Hiii
>
>
>    tell me how to implement own realloc and malloc and free function?
>
>    any link for this??
>
>    If anybody is implemented it,give code ?
>
>
>
>   Topic: OT- Latest C++ primer 
> edition.<http://groups.google.com/group/algogeeks/t/d02488a3835272a5>
>
>    Pankaj <jatka.oppimi...@gmail.com> Aug 08 10:48AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    I have been trying to find it on net in *pdf* format but unsuccessful.
>    Online bookstore link will do with reasonable rate :)
>    or If anyone can share the pdf link.
>
>    Cheers
>    Pankaj
>
>
>
>   Topic: Probability 
> Puzzle<http://groups.google.com/group/algogeeks/t/b38cab4e1c03819a>
>
>    Dave <dave_and_da...@juno.com> Aug 07 01:10PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    @Puneet: So are you saying that 100 heads in a row wouldn't convince
>    you that you had the unfair coin? How many heads in a row would it
>    take?
>
>    Dave
>
>
>
>
>
>    Brijesh Upadhyay <brijeshupadhyay...@gmail.com> Aug 07 02:57PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    I think 17/80 is right answer.. otherwise no use of mentioning *first
>    five
>    times* specifically in the question..... ! though m not sure
>
>
>
>
>    "D.B." <sylve...@gmail.com> Aug 07 09:24PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    1/5+1/2^6
>
>
>
>
>
>    Kamakshii Aggarwal <kamakshi...@gmail.com> Aug 08 10:35AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    i think the answer will be 1/5+ 4/5*1/2=3/5
>
>    coz the question is saying what is the probability of getting head*
>    sixth
>    time*(when 5 heads were already there)..
>
>
>    it is not saying what is the probability of getting heads* 6
>    times*..(in
>    this case answer will be 17/180)
>
>
>    --
>    Regards,
>    Kamakshi
>    kamakshi...@gmail.com
>
>
>
>
>    kumar raja <rajkumar.cs...@gmail.com> Aug 08 09:09AM +0400 
> ^<#131a7eff78fc9b31_digest_top>
>
>    I think the answer is 3/5, becoz all the trails/tossing coins are
>    independent events. So even when it is 100th time the answer is 3/5.
>
>
>    --
>    Regards
>    Kumar Raja
>    M.Tech(SIT)
>    IIT Kharagpur,
>    10it60...@iitkgp.ac.in
>    7797137043.
>    09491690115.
>
>
>
>   Topic: MICROSOFT INTERVIEW QUESTIONS faced by my frenz nd 
> me<http://groups.google.com/group/algogeeks/t/9baf0abfd828a046>
>
>    siddharam suresh <siddharam....@gmail.com> Aug 08 10:14AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    y'day i have attended the MS test. Following are the questions.
>    1)there are two arrays a={1,2,3} b={4,5,6,7,0,0,0}, b has enough space
>    to accommodate the elements of a[] that is trailing 0's in b. o/p
>    should be
>    sorted array containing both the elements of a[] n b[] in above example
>    b={1,2,3,4,5,6,7}
>    2) write the test case for above algo
>    3) read a file, tell how many time the words in the file
>    repeated(count) and
>    line number
>    o/p
>    <word>\t<count of the word in the file>\t<line number>
>    4)another questions on design of system. i didn't that question at all.
>
>    Thank you,
>    Siddharam
>
>
>
>
>
>
>    siddharam suresh <siddharam....@gmail.com> Aug 08 10:20AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    Thank you,
>    Siddharam
>
>
>    On Mon, Aug 8, 2011 at 10:14 AM, siddharam suresh
>
>
>
>   Topic: Sum from 
> array<http://groups.google.com/group/algogeeks/t/22b7ed7a0a00da66>
>
>    Prakash D <cegprak...@gmail.com> Aug 07 10:23PM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    is there a faster algo than O(n^2)?
>
>
>
>
>
>    Parv Malhotra <parvmalho...@gmail.com> Aug 08 09:43AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    An O(n) solution exists only for the cases where we need to find TWO
>    numbers
>    in an array whose sum =X .
>
>    start from the first element of the array and keep a hashtable to store
>    the
>    potential pairs. We will check if sum – (a[i]) already exists in the
>    Hashtable. If yes, we have a pair (a[i], value from hashtable) as the
>    pair
>    with the sum. If no, we store a[i] in the hashtable.
>
>    array a= {1,2,3,4,5,6,7,8} and sum = 6.
>
>    6 – 1 = 5 — found in Hashtable H ? No – store it in H. H will contain
>    (1)
>
>    6 –2 = 4 – found in Hashtable H ? No – store it in H. H will contain
>    (1, 2)
>
>    6 –3 = 4 – found in Hashtable H ? No – store it in H. H will contain
>    (1, 2,
>    3)
>
>    6 –4 = 2 – found in Hashtable H ? Yes – now we have a pair (a[i] ,
>    found in
>    H) – (4,2)
>
>    6 –5 = 1 – found in Hashtable H ? Yes – now we have a pair (a[i] ,
>    found in
>    H) – (5,1)
>
>
>
>
>
>   Topic: max 
> product!<http://groups.google.com/group/algogeeks/t/fa8b7c40cd8084c2>
>
>    Gaurav Menghani <gaurav.mengh...@gmail.com> Aug 08 09:17AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    Greedy doesn't work here
>
>
>    --
>    Gaurav Menghani
>
>
>
>   Topic: max 
> product<http://groups.google.com/group/algogeeks/t/989213b3e3956a9b>
>
>    victory tunn <loserinvict...@gmail.com> Aug 08 02:35AM +0530 
> ^<#131a7eff78fc9b31_digest_top>
>
>    @Punnet : why to find smallest three. SMALLEST here means negative
>    numbers//
>    lets say smallest1 is smaller than smallest2 and
>    larget1>larget2>larget3
>    I think we just need to find smallest 2( because -ve * -ve = pos);
>
>    then result = max( smallest1*smallet2*largest1 ,
>    larget1,larget2,larget3)
>
>    Please correct me If I am wrong
>    Thanks,
>
>
>
>
>
>    UTKARSH SRIVASTAV <usrivastav...@gmail.com> Aug 07 06:07PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    i think searching for largest or smallest number may be O(n) so make a
>    bst
>    and do it's inorder traversal last three elements will have max product
>
>
>    --
>    *UTKARSH SRIVASTAV
>    CSE-3
>    B-Tech 3rd Year
>    @MNNIT ALLAHABAD*
>
>
>
>
>    Dave <dave_and_da...@juno.com> Aug 07 08:36PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    @Utkarsh: And what is the complexity of making a bst? So will the
>    complexity of your suggestion be more or less than O(n)?
>
>    Dave
>
>
>
>
>   Topic: AKAMAI and NETAPP 
> ??<http://groups.google.com/group/algogeeks/t/9cc274d7603bc617>
>
>    htross <htb...@gmail.com> Aug 07 03:10PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    what questions is akamai asking?????
>
>
>
>   Topic: C question.. increment decrement 
> operator..<http://groups.google.com/group/algogeeks/t/f9c55e8f32a47f47>
>
>    Gary Drocella <gdroc...@gmail.com> Aug 07 01:23PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    @puneet The provided faq is garbage, if you want to learn about the
>    semantics of the C programming
>    language, then refer to this original ISO spec here
>    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
>    I also suggest that for all programming languages (OCaml, Ruby, lua
>    script, etc)
>
>    It is definitely not the OS that determines how to execute a given
>    fragment of C code, this is the job of the compiler.
>    The compiler converts the code into machine code using grammar parsing
>    techniques, and the validity of compiling
>    C code such as this
>
>    [CODE]
>    int i = 1, j = 3;
>    printf("%d", i+++++j);
>    [/CODE]
>
>    will more then likely depend on w/e compiler you're using. If it's a
>    good compiler like gcc you can tell the compiler what standard to use.
>    gcc -ansi -o foo foo.c
>    gcc -c99 -o foo foo.c
>
>    The only time an OS would do any parsing of code is if you built an
>    interpreter such as the JVM on the bare metal of a machine. Benefit
>    being
>    you have a garbage collector cleaning up un-used memory. The OS is
>    more of an abstraction between userspace and the hardware.
>
>
>
>
>
>    UTKARSH SRIVASTAV <usrivastav...@gmail.com> Aug 07 01:27PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    please these questions are compiler dependent and have no standard
>    answers...........these are rarely asked by companies
>
>
>    --
>    *UTKARSH SRIVASTAV
>    CSE-3
>    B-Tech 3rd Year
>    @MNNIT ALLAHABAD*
>
>
>
>
>    Gary Drocella <gdroc...@gmail.com> Aug 07 02:08PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    I thought this was algogeeks, not company question geeks.
>
>
>
>
>
>    UTKARSH SRIVASTAV <usrivastav...@gmail.com> Aug 07 02:39PM -0700 
> ^<#131a7eff78fc9b31_digest_top>
>
>    but these questions don't have an algo
>
>
>    --
>    *UTKARSH SRIVASTAV
>    CSE-3
>    B-Tech 3rd Year
>    @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.

Reply via email to