Re: [algogeeks] Re: BST in BT

2010-09-28 Thread TurksHead Education
Maximum Sized Binary Search Tree in a Binary Tree: http://www.rawkam.com/?p=822 On Mon, Sep 27, 2010 at 10:34 AM, Chonku cho...@gmail.com wrote: @Prodigy As per your example, 8 15 20 25 which is the is indeed the maximum binary search tree in this binary tree is only a solution to smaller

Re: [algogeeks] Re: power set

2010-09-28 Thread TurksHead Education
Power set : http://www.rawkam.com/?p=330 On Sun, Sep 19, 2010 at 2:45 AM, Gene gene.ress...@gmail.com wrote: The power set of a set with N elements has size O(2^N). You can't do anything with it in polynomial time. On Sep 18, 5:03 pm, bittu shashank7andr...@gmail.com wrote: can we solve

Re: [algogeeks] finding largest and second largest elements

2010-09-28 Thread TurksHead Education
see a nice solution and related puzzle at http://www.rawkam.com/?p=1034 On Tue, Sep 28, 2010 at 6:31 AM, sharad kumar aryansmit3...@gmail.comwrote: hey isn't it suppposed to be tournament problem.. On Fri, Sep 24, 2010 at 12:06 AM, Divesh Dixit dixit.coolfrog.div...@gmail.com wrote:

Re: [algogeeks] Excellent Compilation of Interview Questions

2010-09-16 Thread TurksHead Education
gimme a break dude!..as if all the content u host is legit n copyrighted Regards, Sasank Krishna http://krishna-shashank.co.nr/ http://krishna-shashank.co.nr/http://www.cracktheinterview.org/ On Tue, Sep 14, 2010 at 10:55 PM, TurksHead Education turksheadeducat...@gmail.com wrote

Re: [algogeeks] Recursion!!!!!!!!!!! Always Stuck

2010-09-15 Thread TurksHead Education
Recursion: http://www.rawkam.com/?p=283 http://www.rawkam.com/?p=283Tower Of Hanoi: http://www.rawkam.com/?p=917 http://www.rawkam.com/?p=917 http://www.rawkam.com/?p=941 http://www.rawkam.com/?p=941 On Fri, Sep 10, 2010 at 1:11 AM, albert theboss alberttheb...@gmail.comwrote:

Re: [algogeeks] Re: Given an array, find out if there exists a pair of nos. that adds up to a sum 'x'

2010-09-14 Thread TurksHead Education
A very nice explanation at http://www.rawkam.com/?p=345 On Tue, Sep 14, 2010 at 3:16 PM, soundar soundha...@gmail.com wrote: #include iostream #include cstring #include conio.h using namespace std; int main() { int n,a[30],temp[30],x; cin n; memset(temp,0,sizeof(temp));

Re: [algogeeks] Google Interview Question

2010-09-14 Thread TurksHead Education
Number of correctly matched pair of n parenthesis will be a catalan number Cn. You may want to see the application of catalan numbers at http://www.rawkam.com/?p=568 http://www.rawkam.com/?p=568 On Tue, Sep 14, 2010 at 8:27 PM, bittu shashank7andr...@gmail.com wrote: Write a function

Re: [algogeeks] Re: Excellent Compilation of Interview Questions

2010-09-14 Thread TurksHead Education
for product companies like Microsoft, Google Adobe see http://www.rawkam.com/ On Sun, Sep 12, 2010 at 4:30 PM, aparichith vineelyalamar...@gmail.comwrote: Can any one tell me how to prepare for a good product development company with in 6 months time interval ? -- You received this

Re: [algogeeks] Excellent Compilation of Interview Questions

2010-09-14 Thread TurksHead Education
Shame on you.. you have copied the articles as it is from other sites. For example, the article http://www.cracktheinterview.org/2010/08/converting-a-tree-to-a-doubly-linked-list/; is an exact copy-paste from rawkam.com. So much so that the images still point to images of rawkam.com On Sat, Sep

Re: [algogeeks] Re: Permutation.................

2010-08-25 Thread TurksHead Education
A nice explaination at http://www.rawkam.com/?p=351 On Tue, Aug 24, 2010 at 6:49 PM, Chandan Balu chandann...@gmail.com wrote: Can somebody please tell me, how does the above code for permutation works(Algorithms behind) please? On Mon, Aug 2, 2010 at 4:31 AM, bujji jajalabu...@gmail.com

Re: [algogeeks] Re: 5 pirate problem

2010-08-25 Thread TurksHead Education
A nice explaination with screenshots is given at http://www.rawkam.com/?p=1156 On Tue, Aug 24, 2010 at 8:12 PM, Ajay Mohan ajay.marle...@gmail.com wrote: @ Dave Tat s really a cool solution Dave. So i thot of generalizing the solution. If there are 'N' pirates then * The eldest should

Re: [algogeeks] Re: linked list as tree

2010-08-25 Thread TurksHead Education
I hope you are not talking about converting a tree into a linked list http://www.rawkam.com/?p=1139 On Tue, Aug 24, 2010 at 7:20 AM, Raj N rajn...@gmail.com wrote: I came across this example that the leaves of the tree can be the nodes of a linked list and the inner nodes of the tree can be

Re: [algogeeks] Re: To sort an array of 0,1,2

2010-08-23 Thread TurksHead Education
I think the first 3 methods of the total 4 specified at http://www.rawkam.com/?p=168 will be applicable for sorting arrays with 0,1 2 On Mon, Aug 23, 2010 at 11:07 AM, Jameel Mohamed jameel.moha...@gmail.comwrote: Use counting sort. time complexity is O(n) On Aug 22, 1:11 pm, AlgoBoy

Re: [algogeeks] Re: BST Problem

2010-08-23 Thread TurksHead Education
I am not sure if I am repeating the answer: The problem will reduce to find the pair of elements which will sum up to a particular number. Then read the below article, http://www.rawkam.com/?p=345 On Mon, Aug 23, 2010 at 9:29 AM, R.ARAVINDH aravindhr...@gmail.com wrote: @giri: can u post

Re: [algogeeks] Sorting algorithm

2010-08-23 Thread TurksHead Education
Comparison Sort Algorithms cannot sort in linear time( http://www.rawkam.com/?p=886) so we have to use some non-comparison sorting algorithm like Counting Sort,Bucket Sort, Radix Sort etc. But all the non-comparison sort algorithms requires the input to be in a particular order. (For example:

Re: [algogeeks] Permutation.................

2010-08-02 Thread TurksHead Education
you may also want to see http://www.rawkam.com/?p=351 http://www.rawkam.com/?p=351-Kamal On Sun, Aug 1, 2010 at 7:40 PM, UMESH KUMAR kumar.umesh...@gmail.comwrote: On Sun, Aug 1, 2010 at 5:20 PM, Pramod Negi negi.1...@gmail.com wrote:

Re: [algogeeks] Re: median of array

2010-07-09 Thread TurksHead Education
Both the algorithms are explained in great detail at the below link: http://www.rawkam.com/?p=870 - On Wed, Jul 7, 2010 at 8:39 AM, Dave dave_and_da...@juno.com wrote: Of course O(n) is the average complexity. The worst-case complexity is O(n^2). There is a divide and conquer algorithm with

Re: [algogeeks] basic problem

2010-03-24 Thread TurksHead Education
This is because by definition linked lists are dynamic.. If they reside on stack they cannot be dynamic (extensible in size) On Wed, Mar 24, 2010 at 2:42 AM, aman goyal aman...@gmail.com wrote: why do we use malloc funtcn to allocate memory for a stuct node variable pointer.. why dont we