<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/algogeeks</id>
  <title type="text">Algorithm Geeks Google Group</title>
  <subtitle type="text">
  Discuss ideas, algorithms, challenges related to programming. Also annoucements about Online Programming Contests will be posted in this group.
  </subtitle>
  <link href="/group/algogeeks/feed/atom_v1_0_msgs.xml" rel="self" title="Algorithm Geeks feed"/>
  <updated>2009-12-27T03:05:15Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>me13013</name>
  <email>me13...@gmail.com</email>
  </author>
  <updated>2009-12-27T03:05:15Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/6b85c93d4982251f/9a9c272cab7ca546?show_docid=9a9c272cab7ca546</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/6b85c93d4982251f/9a9c272cab7ca546?show_docid=9a9c272cab7ca546"/>
  <title type="text">Re: An interview question</title>
  <summary type="html" xml:space="preserve">
  The best solution is going to depend on properties of the graph. One &lt;br&gt; solution not yet mentioned is to perform breadth first searches from &lt;br&gt; both v and N (if it&#39;s a digraph, backward search from N) and report &lt;br&gt; paths when some node appears in the current &amp;quot;wave&amp;quot; from both ends. If &lt;br&gt; number of nodes visited much lower than (roughly 2sqrt of) doing depth
  </summary>
  </entry>
  <entry>
  <author>
  <name>sat</name>
  <email>sathiyanannaunivers...@gmail.com</email>
  </author>
  <updated>2009-12-26T11:03:44Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/7a6711e8e62f7ce8?show_docid=7a6711e8e62f7ce8</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/7a6711e8e62f7ce8?show_docid=7a6711e8e62f7ce8"/>
  <title type="text">Re: Hight of a node whose leafs are connected by DLL .. A MS question</title>
  <summary type="html" xml:space="preserve">
  we need to traverse the BST to the left recursivly until we reach the &lt;br&gt; node of left is null. we would have reached the node for which left &lt;br&gt; pointer is null.. so we are in leaf node .. so we can easily calculate &lt;br&gt; the height of the node &lt;br&gt; Is my solution is correct... if any thing is wrong &lt;br&gt; with me.. pls revert me back..
  </summary>
  </entry>
  <entry>
  <author>
  <name>Manisha</name>
  <email>pgo...@gmail.com</email>
  </author>
  <updated>2009-12-25T15:34:11Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/136998705db63318?show_docid=136998705db63318</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/136998705db63318?show_docid=136998705db63318"/>
  <title type="text">Re: Hight of a node whose leafs are connected by DLL .. A MS question</title>
  <summary type="html" xml:space="preserve">
  One way of doing is by means of augmented nodes. Each node will have &lt;br&gt; additional flag indicating whether its leaf node.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Manisha</name>
  <email>pgo...@gmail.com</email>
  </author>
  <updated>2009-12-25T16:02:06Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/304c393850de7904/aab578642c7e8ab8?show_docid=aab578642c7e8ab8</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/304c393850de7904/aab578642c7e8ab8?show_docid=aab578642c7e8ab8"/>
  <title type="text">Re: sort the LL</title>
  <summary type="html" xml:space="preserve">
  Separate the ascending and descending lists. &lt;br&gt; lets say ascending lists are l1,l2,l3 and l4 and descending lists &lt;br&gt; are l5,l6,l7. &lt;br&gt; Reverse all these descending list.(reverse(l5),reverse(l6) and &lt;br&gt; reverse(l7)) &lt;br&gt; Now keep on merging all these 7 sorted lists two at a time. &lt;br&gt; Its of ~o(n)time and o(1)space
  </summary>
  </entry>
  <entry>
  <author>
  <name>kunzmilan</name>
  <email>kunzmi...@atlas.cz</email>
  </author>
  <updated>2009-12-23T10:31:36Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/6b85c93d4982251f/3fc4161bef6874b2?show_docid=3fc4161bef6874b2</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/6b85c93d4982251f/3fc4161bef6874b2?show_docid=3fc4161bef6874b2"/>
  <title type="text">Re: An interview question</title>
  <summary type="html" xml:space="preserve">
  The adjacency matrix A shows all paths between vertices of lenghts 1. &lt;br&gt; Its powers A^n shows all paths between vertices ij of length n. &lt;br&gt; kunzmilan
  </summary>
  </entry>
  <entry>
  <author>
  <name>Harish</name>
  <email>harishp...@gmail.com</email>
  </author>
  <updated>2009-12-23T09:03:57Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/ef6a1437ed3ac056?show_docid=ef6a1437ed3ac056</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/ef6a1437ed3ac056?show_docid=ef6a1437ed3ac056"/>
  <title type="text">Re: Hight of a node whose leafs are connected by DLL .. A MS question</title>
  <summary type="html" xml:space="preserve">
  Hi , &lt;br&gt; First Identify the leaf nodes: Have an array or list. keep populating &lt;br&gt; the pointer to left child into the list in the same order as they &lt;br&gt; come. &lt;br&gt; When you encounter the first duplicate, You know the nodes between the &lt;br&gt; 2 duplicates (including the duplicate) are the leaf nodes. &lt;br&gt; Now recursively scan the left and right subtree , like its done in
  </summary>
  </entry>
  <entry>
  <author>
  <name>pratik</name>
  <email>pratik.deogh...@gmail.com</email>
  </author>
  <updated>2009-12-22T17:38:21Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/304908db902bd49f?show_docid=304908db902bd49f</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/304908db902bd49f?show_docid=304908db902bd49f"/>
  <title type="text">Re: Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  I hope this helps &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://neopythonic.blogspot.com/2008/10/sorting-million-32-bit-integers-in-2mb.html&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Bijlwan</name>
  <email>viv...@gmail.com</email>
  </author>
  <updated>2009-12-22T12:34:02Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/2952f6afb1f65e8b?show_docid=2952f6afb1f65e8b</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/2952f6afb1f65e8b?show_docid=2952f6afb1f65e8b"/>
  <title type="text">Re: Hight of a node whose leafs are connected by DLL .. A MS question</title>
  <summary type="html" xml:space="preserve">
  I think that the soln to the same would be something like : &lt;br&gt; say the length of the linked list be n. &lt;br&gt; then height = no. of bits in n + ( no . of ones that are there in &lt;br&gt; the binary representation of n) -1 &lt;br&gt; kindly confirm if the above can be an answer. &lt;br&gt; thanks in advance.
  </summary>
  </entry>
  <entry>
  <author>
  <name>ganesa thandavam</name>
  <email>gthanda...@gmail.com</email>
  </author>
  <updated>2009-12-22T10:49:31Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/4576057ea7277c62?show_docid=4576057ea7277c62</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/1e64db1ac7ac0128/4576057ea7277c62?show_docid=4576057ea7277c62"/>
  <title type="text">Re: Hight of a node whose leafs are connected by DLL .. A MS question</title>
  <summary type="html" xml:space="preserve">
  what do u mean by height of a node exactly ... &lt;br&gt; can u give examples &lt;br&gt; like height (6) = 1 &lt;br&gt; height(10) = 2 ??? &lt;br&gt; what ever be the thing the trick lies in identifying the leaf &lt;br&gt; level... &lt;br&gt; which can be done by (node-&amp;gt;left-&amp;gt;right == node ) this check. &lt;br&gt; if it is true we are at the leaf level ...
  </summary>
  </entry>
  <entry>
  <author>
  <name>Siddharth Prakash Singh</name>
  <email>sps...@gmail.com</email>
  </author>
  <updated>2009-12-21T15:13:41Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/d6e19b8d90a23df3?show_docid=d6e19b8d90a23df3</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/d6e19b8d90a23df3?show_docid=d6e19b8d90a23df3"/>
  <title type="text">Re: [algogeeks] Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  This wikipedia article on external sorting may help : &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://en.wikipedia.org/wiki/External_sorting&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Abhilash L L</name>
  <email>llabhil...@gmail.com</email>
  </author>
  <updated>2009-12-21T14:48:59Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/a5a0fb3e34e6baa9?show_docid=a5a0fb3e34e6baa9</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/a5a0fb3e34e6baa9?show_docid=a5a0fb3e34e6baa9"/>
  <title type="text">Re: [algogeeks] Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  A merge sort would be helpful i guess... it can also happen in parallel and &lt;br&gt; IIRC databases use them internally. &lt;br&gt; Please correct me if im wrong. &lt;br&gt; Regards, &lt;br&gt; Abhilash
  </summary>
  </entry>
  <entry>
  <author>
  <name>Karthik Reddy</name>
  <email>karthik.gin...@gmail.com</email>
  </author>
  <updated>2009-12-21T13:32:36Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/77304bbd2785bf68?show_docid=77304bbd2785bf68</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/77304bbd2785bf68?show_docid=77304bbd2785bf68"/>
  <title type="text">Re: [algogeeks] Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  could you describe what kind of data exists . i mean are duplicates allowed?
  </summary>
  </entry>
  <entry>
  <author>
  <name>dinesh bansal</name>
  <email>bansal...@gmail.com</email>
  </author>
  <updated>2009-12-21T13:36:02Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/35e62ba894bbe35d?show_docid=35e62ba894bbe35d</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/35e62ba894bbe35d?show_docid=35e62ba894bbe35d"/>
  <title type="text">Re: [algogeeks] Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  Hi Linus, &lt;br&gt; Thanks for the reply. But yes we cannot guarantee that data value are &lt;br&gt; unique.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Linus Probert</name>
  <email>linus.prob...@gmail.com</email>
  </author>
  <updated>2009-12-21T13:17:12Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/0fdbd7183b32b817?show_docid=0fdbd7183b32b817</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/0fdbd7183b32b817?show_docid=0fdbd7183b32b817"/>
  <title type="text">Re: [algogeeks] Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  If the numbers are unique you could use a bitmap-sort this way you could &lt;br&gt; easily read just parts of the file at a time. &lt;br&gt; If they aren&#39;t unique it gets a bit trickier. &lt;br&gt; /L
  </summary>
  </entry>
  <entry>
  <author>
  <name>dinesh bansal</name>
  <email>bansal...@gmail.com</email>
  </author>
  <updated>2009-12-21T13:14:07Z</updated>
  <id>http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/280011aea9e1d95e?show_docid=280011aea9e1d95e</id>
  <link href="http://groups.google.com/group/algogeeks/browse_thread/thread/ab2f2d2c7a995c6d/280011aea9e1d95e?show_docid=280011aea9e1d95e"/>
  <title type="text">Sort the data from a big file.</title>
  <summary type="html" xml:space="preserve">
  Hi All, &lt;br&gt; Suppose I have a big file (~100M) containing integer data. I want to sort &lt;br&gt; this file. The problem is I don&#39;t want to load the complete file data into &lt;br&gt; main memory in one shot. I mean I can read the file in batches and sort the &lt;br&gt; batch and save it in another file but cannot store the entire file contents
  </summary>
  </entry>
</feed>
