Re: [algogeeks] problem regarding gcc installation

2011-04-29 Thread jaladhi dave
I second Charles thought . The quality of the list is detoriating day by day, due to such off topic questions. On 30-Apr-2011 12:27 AM, Charles Turner chtu...@gmail.com wrote: On 29/04/2011 19:52, himanshu kansal wrote: yeah i knw dt well...bt i jus asked if sum1 cd help me I really don't

Re: [algogeeks] [brain teaser ] 17march

2011-03-26 Thread jaladhi dave
its lee. BTW no offense intended but what has this to do with algorithms ? On Thu, Mar 17, 2011 at 1:58 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote: *Problem Solution* * *Lee's parents have five children, the names of the first four are La, Le, Li, and Lo. What's the name of the fifth

Re: [algogeeks] amazon

2011-02-22 Thread jaladhi dave
What do you mean by data element here ? Also by file you mean the file where you wrote the code ? And above all which programming language are we talking ? You hit send button too early I guess :) On 22-Feb-2011 7:39 PM, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote: Is there any way by which

Re: [algogeeks] UVA Online Submission.

2011-02-22 Thread jaladhi dave
input and output are files only. :) On Sun, Feb 13, 2011 at 9:09 AM, Umer Farooq the.um...@gmail.com wrote: You mean that input/output is on console and that they don't appreciate filing? On Sat, Feb 12, 2011 at 7:51 PM, Wesley Mesquita wesleymesqu...@gmail.com wrote: You should use the

Re: [algogeeks] m-permutation

2011-02-12 Thread jaladhi dave
search for modified josephus problem. you will get the answer :) On Wed, Feb 9, 2011 at 4:52 PM, punnu punnu.gino...@gmail.com wrote: Suppose n people are arranged in a circle. Number the people from 1 to n. in the clockwise order. We are given an integer ,m = n. Beginning with the person with

Re: [algogeeks] extendible hashing

2011-02-12 Thread jaladhi dave
If you want to access disk blocks directly, hack to disk driver and create a flat file for block lookups. On Wed, Feb 9, 2011 at 11:32 PM, jagannath prasad das jpdasi...@gmail.com wrote: guys someone help me out..its urgent On Wed, Feb 9, 2011 at 1:18 PM, jagannath jpdasi...@gmail.com

Re: [algogeeks] Design question

2011-02-07 Thread jaladhi dave
top of mind thoughts. Chess layout one array of objects. Methods: - get_content() - set_postion() - is_check() etc. generic class each chessmen: sub class type of chessmen(knight,rook etc) methods: next_moves() make_move() is_alive() etc. On Mon, Feb 7, 2011 at 4:12 PM, Manmeet

Re: [algogeeks] Re: Good question

2011-02-06 Thread jaladhi dave
it has variable defined On Sun, Feb 6, 2011 at 7:47 AM, Venki venkatcollect...@gmail.com wrote: Hi Gajendra, See the following link http://geeksforgeeks.org/forum/topic/huwaei-interview-question-for-software-engineerdeveloper-2-5-years-about-cpuzzles#post-18725 On Feb 5, 7:28 pm, Gajendra

Re: [algogeeks] can i know the best way to learn programming??

2011-02-02 Thread jaladhi dave
any search engine will tell u that :) On Wed, Feb 2, 2011 at 11:53 AM, Ajay Kumar ajay...@gmail.com wrote: @ nishaanthh... what is SPOJ and topcoder...plz help!!! On Tue, Feb 1, 2011 at 9:31 PM, nishaanth nishaant...@gmail.com wrote: solve problems from SPOJ and topcoder.it helps a

Re: [algogeeks] Google Technical Round

2010-12-18 Thread jaladhi dave
Can you give an example, to clarify certain points. -- 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

Re: [algogeeks] compression

2010-11-17 Thread jaladhi dave
Aren't all files sequence of 1s and 0s while getting stored on disk ? On Thu, Nov 4, 2010 at 4:36 PM, neeraj agarwal itsneerajagar...@gmail.comwrote: i have a file contain only 0's and 1's, how can i compress it efficiently. say for e.g

Re: [algogeeks] Re: remove redundantt parenthesis

2010-10-13 Thread jaladhi dave
how can once evaluate a+b, when a and b are just variables.. Its not necessary that the expression contains all the constants. On Wed, Oct 13, 2010 at 10:07 AM, Shiyam code_for_life mailshyamh...@gmail.com wrote: For every pair of braces, Evaluate the expression within the outer braces of

Re: [algogeeks] Yahoo!!!! Puzzle

2010-09-15 Thread jaladhi dave
This looked like a variant of the socks problem :) On Tue, Sep 14, 2010 at 5:20 PM, Sathaiah Dontula don.sat...@gmail.comwrote: How_to_Ace_the_Brainteaser_Interview.pdf find this book, this has good number of puzzles. Thanks, Sathaiah Dontula On Tue, Sep 14, 2010 at 3:01 PM, vishal raja

Re: [algogeeks] Amazon intern Question

2010-09-01 Thread jaladhi dave
trie On Wed, Sep 1, 2010 at 5:45 PM, Arun yourarunb...@gmail.com wrote: You are given the amazon.com database which consists of names of millions of products. When a user enters a search query for particular object with the keyword say foo , output all the products which have names having

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-28 Thread jaladhi dave
this has been discussed here before and if i remeber correctly the solution was O(nlogn). Please go through the archives. On Thu, Aug 26, 2010 at 12:20 PM, Aditya Shanker adit.sh...@gmail.comwrote: The question would be complete if we know what order of notation is needed for solution. On

Re: [algogeeks] Brent's algorithm

2010-08-18 Thread jaladhi dave
Check out this link http://en.wikipedia.org/wiki/Cycle_detection On Wed, Aug 18, 2010 at 5:12 AM, jayapriya surendran priya7...@gmail.comwrote: hi..i wanna know what is brent's algorithm n whether it can be used to detect loops in linked list.If yes..is it better than Floyd's cycle

Re: [algogeeks] Re: Scope of an variable

2010-07-14 Thread jaladhi dave
The Dragon book it is :) On Wed, Jul 14, 2010 at 11:01 AM, Gene gene.ress...@gmail.com wrote: The classic reference is the Dragon Book, Aho Sethi and Ullman, Compiler Design, but there are many others. Louden Compiler Construction is a little easier to read. I have not found much

Re: [algogeeks] Re: Amazon Puzzle

2010-07-09 Thread jaladhi dave
awesome :) On Wed, Jul 7, 2010 at 9:07 AM, Dave dave_and_da...@juno.com wrote: There are 6 cases to consider (we can list them but we don't know which one applies): 1. Initially, all 4 coins are tails. 2. Initially, all 4 coins are heads. 3. Initially, 3 of the coins are heads, 1 is tails.

Re: [algogeeks] Re: cycle in Linked List generalised

2010-07-07 Thread jaladhi dave
There are more efficient ways of doing this. Refer wiki http://en.wikipedia.org/wiki/Cycle_detection#Brent.27s_algorithm On Wed, Jul 7, 2010 at 9:16 AM, Dave dave_and_da...@juno.com wrote: @Anand. You've described one way to do it, and maybe the most efficient way, but not the only way. Dave

Re: [algogeeks] plotter

2010-07-07 Thread jaladhi dave
good problem modeling :) On Tue, Jul 6, 2010 at 10:21 AM, Jitendra Kushwaha jitendra.th...@gmail.com wrote: problem can be converted in a graph question we have nC2 paths in n node (here n represent total points) now do travelling salesman on this graph. And the question is done --

Re: [algogeeks] lru cache

2010-07-02 Thread jaladhi dave
keep n bits (depending on the usage level you want) to track for each element (cell/page) etc in the cache. Now whenever an element is loaded into cache set all the bits and on further use increment by 1 if not max value. Decrement value by 1 for all the block periodically. Now whenever you

Re: [algogeeks] Some C language Problem

2010-07-01 Thread jaladhi dave
For header file creation see any standard c library header files example. One thing to take care is to create a C define which will cause the file to be included only once. Regarding inserting the function, its prototype should be defined in appropriate header file and the code in associated .c

Re: [algogeeks] OS problems

2010-06-18 Thread jaladhi dave
can you explain what you meant when you said the program fails after allocationg about 800mg(appx. i dont remember). This is the excerpt from calloc man page, Calloc will either fail or succeed but there is no way you can tell so much was alloted and then it failed. *Return Value***For calloc()

Re: [algogeeks] lowest common ancestor

2010-06-18 Thread jaladhi dave
very nice and informative link. Thanks a lot :) On Thu, Jun 17, 2010 at 4:08 PM, Vivek Sundararajan s.vivek.ra...@gmail.com wrote: http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=lowestCommonAncestor The above link gives a detailed explanation about LCA and RMQ On 17 June 2010

Re: [algogeeks] Re: union- c

2010-06-15 Thread jaladhi dave
I second this opinion. Lets keep discussion limited to algorithms only. On Mon, Jun 14, 2010 at 5:47 AM, Roshan Mathews rmath...@gmail.com wrote: On Sun, Jun 13, 2010 at 18:36, souravsain souravs...@gmail.com wrote: Lets keep discussions in t his group limited to Algos and problems neutral

Re: [algogeeks] nibbles

2010-06-13 Thread jaladhi dave
Write a c-macro to use assembly swap opcode. On Sat, Jun 12, 2010 at 9:35 PM, jalaj jaiswal jalaj.jaiswa...@gmail.comwrote: write an algorithm to reverse a nibble in one pass...using bitwise operators -- With Regards, Jalaj Jaiswal +919026283397 B.TECH IT IIIT ALLAHABAD -- You

Re: [algogeeks] Mirroring Binary Tree Pattern Problem

2010-06-13 Thread jaladhi dave
what is a virtualization concept ??? I am a newbie regarding the Algo Analysis. I was asked this question recently in an interview. Please let me know if anyone of you know how to solve this. *Question:* Assume You have a binary Tree (not sorted and not BST) with a specific pattern on a

Re: [algogeeks] Re: identify the recurring part for a given decimal no

2010-06-13 Thread jaladhi dave
Won't we require to check recurring till at-least two complete iterations of recurrence pattern. Also what's the division logic are we going to use ? In all modern day processor systems, we are likely to have a math co/sub-processor which will efficiently crunch numbers and round them off to our

Re: [algogeeks] stack

2010-06-13 Thread jaladhi dave
what do you mean by sorting elements in stack ? A stack is a data structure in which the relative position of elements depend on their order of insertion. If we sort elements in stack, how does it retain the property of a stack ? If we really want that property, we will have O(n) rather than

Re: [algogeeks] Re: binary nos

2010-06-10 Thread jaladhi dave
@Rohit: Junta is looking forward for explanation about how one resorted to Fibonacci for such solution ? Or was it some 'gyaan' like sun rise in east direction. Would be real glad if we can know methods to find such fits. On Wed, Jun 9, 2010 at 9:16 PM, Rohit Saraf

Re: [algogeeks] Re: binary nos

2010-06-09 Thread jaladhi dave
hmmm ... Atleast I was of the opinion that such nos. were required and hence was thinking fib is not the thing. Thanks for clarifying. On Wed, Jun 9, 2010 at 8:02 AM, Rohit Saraf rohit.kumar.sa...@gmail.comwrote: Fib comes because she wants the number of such sequences --

Re: [algogeeks] Re: constraints satisfied?

2010-06-09 Thread jaladhi dave
Using an n*n array, am afraid, will not solve the problem, since its not capable to capture transitivity. Consider the case: v1=v2 v3=v2 v3!=v1 we will place 0 in arr(1,2) arr(2,1) for v1=v2 we will place 0 in arr(2,3) arr(3,2) for v3=v2 and place 1 in arr(1,3) and arr(3,1) for v3!=v1. no

Re: [algogeeks] divisible by 3

2010-06-07 Thread jaladhi dave
how abt using FSA ? consider state as a remainder when the given no. is divided by 3. Then we get a FSA for any length no. as [image: fsa.JPG] On Sun, Jun 6, 2010 at 12:15 AM, divya sweetdivya@gmail.com wrote: Find if a number is divisible my 3, without using %,/ or *. You can

Re: [algogeeks] Valid permutation of the brackets

2010-06-04 Thread jaladhi dave
Believe it won't be simple, since its not following a language like hierarchy. try to evolve set of solution for 4 from 3 and you will notice that its not a straight function. On Fri, Jun 4, 2010 at 1:40 PM, Rohit Saraf rohit.kumar.sa...@gmail.comwrote: @jitendra: How can you say that no

Re: [algogeeks] Check if 2 linked lists are identical

2010-06-03 Thread jaladhi dave
@ Raj, Just to clarify, same elements refer to copy of identical data or link list members pointing to same data ? On Wed, Jun 2, 2010 at 10:47 PM, Raj N rajn...@gmail.com wrote: @Antony: The 2 lists should have the same elements as well the number must be equal On Wed, Jun 2, 2010 at 5:38

Re: [algogeeks] sizrof imolementation

2010-05-31 Thread jaladhi dave
As you already mentioned sizeof is an operator and not a lib fn. Which means it will be evaluated/code for it will be replaced at compile time rather than during execution. It will follow the following grammar, unary_operator: sizeof , and others sizeof: ( unary expression | type_name) and so