[algogeeks] Job Openings in Hyderabad/Bangalore

2018-10-12 Thread kumar raja
Folks, I am looking for job switch in Hyderabad/Bangalore, if any one has references/pointers regarding openings please let me know. -- Regards Kumar Raja -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this

Re: [algogeeks] Minimal number of swaps

2016-03-29 Thread kumar raja
Adding time and space complexities. Time complexity: O(n) Space complexity: O(1) On 29 March 2016 at 23:44, kumar raja wrote: > I think it is straight forward. Correct me if i am wrong or if there is > better solution. > > 1) Do one pass over the list of elements and count the n

Re: [algogeeks] Minimal number of swaps

2016-03-29 Thread kumar raja
nd stop receiving emails from it, send an > email to algogeeks+unsubscr...@googlegroups.com. > -- Regards Kumar Raja -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.

[algogeeks] Programming questions

2015-02-09 Thread kumar raja
1) string "a1b2c3d4". rearrange it as "abcd1234". order should be preserved. with time complexity O(n) and space complexity O(1) 2) given a file.txt. replace every occurence of "abc" by "xyz" 3) Write a program to check the elements of an array with even number of elements can be grouped into pai

[algogeeks] Better data structure/Algorithm to handle the following porblem

2014-12-28 Thread kumar raja
which is like a table in database, and produces results for user queries. Data is: in txt file. ID, FIRSTNAME, LASTNAME, AGE, SALARY, TITLE 1, "venkatesh", "kumar", 21, 3, "reporter" 2, "kiran", "kannan", 45, 9000, "chairman" 3, "pradeep", "mishra", 35, 15000, "manager" 4, "suman", "raj", 35,

Re: [algogeeks] Largest Rectangle

2014-12-14 Thread kumar raja
If anyone have answer to this question, please share it. I need the solution for this prolem. On 2 August 2011 at 19:42, payel roy wrote: > > Given a Binary Matrix of 0's and 1's. Print the largest Sub-matrix with > all boundary elements 0. > Explain your whole algorithm with an example. > > -- >

Re: [algogeeks] DP problems

2014-06-06 Thread kumar raja
Got it. Any idea on how to solve the problem 2(e) ? On 6 June 2014 00:52, Saurabh Paliwal wrote: > T[i][j] = 0 (i < 0 || j >=n || i >= j || s[i] != s[j]) > > T[i][j] = 1 + T[i-1][j+1] > > > > > On Fri, Jun 6, 2014 at 12:19 AM, kumar raja > wrote: &g

Re: [algogeeks] DP problems

2014-06-05 Thread kumar raja
If i get u correctly, this is the recurrence relation ( i feel this makes many people to understand the solution rather than looking at the code) T[i..j] indicates the length of longest even length palin string ( not exactly palin but i think u know what i am saying) with i as begin and j as endi

Re: [algogeeks] DP problems

2014-06-05 Thread kumar raja
Paliwal wrote: > Dude! That is what I just posted. Also your logic is wrong, Palindrome > thing is just not working. Think for a while on this problem. > > > On Thu, Jun 5, 2014 at 11:18 PM, kumar raja > wrote: > >> Yes i agree that my recurrence relation is wrong. I hav

Re: [algogeeks] DP problems

2014-06-05 Thread kumar raja
ote: > >> Code ? >> >> >> On Thu, Jun 5, 2014 at 7:08 PM, kumar raja >> wrote: >> >>> U have two dimensions for the table ( has O(n^2) entries.) and to check >>> whether string is palindrome or not it will take O(n) . So it is O(n^3) >>

Re: [algogeeks] DP problems

2014-06-05 Thread kumar raja
N^3) solution even. Can you link the > working code ? > > > On Thu, Jun 5, 2014 at 6:48 PM, kumar raja > wrote: > >> This is a very good collection of DP problems. >> >> I want the answers for problem 2(e) >> and problem 14. >> >> for problem

Re: [algogeeks] Re: Calculating C(n.r)

2014-04-09 Thread kumar raja
e > denominator terms will be 1. In a final loop, compute the product of the > numerator terms. There are some obvious optimizations. > > Dave > > > On Tuesday, April 8, 2014 1:06:47 PM UTC-5, kumar raja wrote: > >> Hi all, >> >> I know the way to ca

[algogeeks] Calculating C(n.r)

2014-04-08 Thread kumar raja
of (n1+n2++nk)! / (n1!.n2!.n3!.nk!) . Regards, Kumar Raja. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.

[algogeeks] Integer partition problem - DP

2014-03-01 Thread kumar raja
Given an integer how many number of ways u can partition the number? e.g. 3 can be written as 3,1+2,1+1+1 and 4 can be written as 4, 1+1+1+1,2+2,1+3,1+1+2 So for 3 --> 3 for 4 -->5. The order of the elements in the partition does not matter. So how to calculate the number of ways to par

Re: [algogeeks] Permuations with stack constraints

2014-02-20 Thread kumar raja
> > dcba > cdba > bdca > adcb > cbda > bcda > acdb > badc > abdc > cbad > bcad > acbd > bacd > abcd > > > Alternatively, you can simply simulate the whole process and do a > validity > check after generation of string. The check b

[algogeeks] Permuations with stack constraints

2014-02-20 Thread kumar raja
Hi all, Here is a permuatation related question. Suppose the set is {a,b,c}; At a given point of time either u can push an elemnt on to the stack or pop of the element. While pushing the elements u have to follow the order a,b,c as given in the set. When u pop the element u will print it to the

[algogeeks] Accelerating subsequence

2014-01-11 Thread kumar raja
Call a sequence X [1 .. n] of numbers accelerating if 2 · X [i] < X [i - 1] + X [i + 1] for all i. Describe an efficient algorithm to compute the length of the longest accelerating subsequence of an arbitrary array A of integers. Any idea how to solve it? Regards, Kumar Raja. -- You recei

Re: [algogeeks] DISTINCT Permutations ( Not Easy)

2014-01-07 Thread kumar raja
This u can do it using the backtracking method. To know how to use backtracking refer algorithm design manual by steve skiena. On 7 January 2014 03:35, bujji jajala wrote: > generate all possible DISTINCT permutations of a given string with some > possible repeated characters. Use as minimal me

Re: [algogeeks] coloring problem Dynamic programming

2013-12-26 Thread kumar raja
Good solution buddy, thanks for the answer. On 26 December 2013 17:25, Saurabh Paliwal wrote: > @atul anand :- no, we need not use all the colors. > > @kumar raja :- sorry dude for replying this late. Continuing with the > previous idea, I extend the solution for the modified prob

Re: [algogeeks] coloring problem Dynamic programming

2013-12-17 Thread kumar raja
does not. Answer[n][k][2] will be the new dimensions. > > I can explain in detail if you don't get this. ☺ > On Dec 15, 2013 4:43 PM, "kumar raja" wrote: > >> What can be the recurrence relation if the condition is changed to "No 3 >> adjacent houses shoul

Re: [algogeeks] coloring problem Dynamic programming

2013-12-15 Thread kumar raja
What can be the recurrence relation if the condition is changed to "No 3 adjacent houses should get same color"? On 15 December 2013 16:26, kumar raja wrote: > No need for the explanation ,got it man thanks. > > > On 15 December 2013 16:20, kumar raja wrote: > >&g

Re: [algogeeks] coloring problem Dynamic programming

2013-12-15 Thread kumar raja
No need for the explanation ,got it man thanks. On 15 December 2013 16:20, kumar raja wrote: > Saurabh your solutions seems right , but can u explain me how did u arrive > at the time and space complexity with some proof /pseudocode/ explanation? > > > On 15 December 2013

Re: [algogeeks] coloring problem Dynamic programming

2013-12-15 Thread kumar raja
k. > > Time complexity = O(n*k*k) > Space complexity = O(k) if only 2 rows are taken ( effectively only 2 are > required ). > > > On Sun, Dec 15, 2013 at 12:44 AM, kumar raja wrote: > >> You have 'n' houses and 'k' colors. The cost of coloring a hou

[algogeeks] coloring problem Dynamic programming

2013-12-14 Thread kumar raja
such that no two adjcent houses will get the same color and the total coloring cost for 'n' houses is minimized. Regards, Kumar Raja. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group an

[algogeeks] Saving and restoring Binary trees in files

2013-11-08 Thread kumar raja
What is the effective way to save and restore the binary trees to files effectively? Regards, Kumar Raja. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from i

Re: [algogeeks] Message distribution through rooted tree dynamic programming

2013-11-07 Thread kumar raja
t; On Friday, November 1, 2013 1:49:33 AM UTC-4, atul007 wrote: > >> we can first count number of nodes in a subtree below each node.Now >> transfer message to max(count(root->left),count->root->right); >> >> On 11/1/13, kumar raja wrote: >> > Suppose

[algogeeks] Pattern matching with regular expressions

2013-11-07 Thread kumar raja
Hi, I want to know some direction towards the problem of pattern matching with regular expressions. Suppose we are given two strings say S and T. Where S is pattern that can contain regular expression and T is some large string . Then how to say that S is substring of T. Eg. S= ab.bc* T=

[algogeeks] Message distribution through rooted tree dynamic programming

2013-10-31 Thread kumar raja
Suppose we need to distribute a message to all the nodes in a rooted tree. Initially, only the root node knows the message. In a single round, any node that knows the message can forward it to at most one of its children. Design an algorithm to compute the minimum number of rounds required for the

Re: [algogeeks] variation of LIS problem

2013-10-25 Thread kumar raja
I think O(nlogn) solution is possible for this problem. First find the largest increasing subsequence in O(nlogn) time. http://en.wikipedia.org/wiki/Longest_increasing_subsequence#Efficient_algorithms >From this one u have LIS array M and parent array P. Now traverse through the array M and for

[algogeeks] Word breaking problem

2013-10-20 Thread kumar raja
I came across the word breaking problem in geeks for geeks. http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/ If the problem statement is to count and print all the possible ways to segment/partitaion a string based on dictionary of words. how to solve this problem? T

Re: [algogeeks] Breaking a string problem (Dynamic programming)

2013-10-17 Thread kumar raja
validate it. > > DP(i,j) = j + (j - i) * min( DP(i , k) , DP(k, j) ) for all i < k < j && > i < j > > > On Sat, Oct 12, 2013 at 12:54 PM, kumar raja wrote: > >> I was not able to figure out the solution to the problem in CLRS book. >> >> A c

[algogeeks] Breaking a string problem (Dynamic programming)

2013-10-12 Thread kumar raja
I was not able to figure out the solution to the problem in CLRS book. A certain string-processing language offers a primitive operation which splits a string into two pieces. Since this operation involves copying the original string, it takes n units of time for a string of length n, regardless

Re: [algogeeks] Find the max element of sets of size K

2013-09-11 Thread kumar raja
I heard there exists a O(n) algorithm in DP? Does anyone has the idea about it? On 11 September 2013 03:21, Aaquib Javed wrote: > http://www.geeksforgeeks.org/maximum-of-all-subarrays-of-size-k/ > > > On Tue, Sep 10, 2013 at 11:46 PM, kumar raja wrote: > >> suppose we hav

[algogeeks] Find the max element of sets of size K

2013-09-10 Thread kumar raja
suppose we have n numbers and k <=n. Then a1,a2... ak is one set. then a2,a3 ak+1 is other set. ... so totally we can have n-k+1 sets. how to figure out the maximum elements of all these k size sets with least possible time complexity and space complexity? -- You received this message beca

[algogeeks] Re: Forums on android

2012-02-13 Thread kumar raja
Reply me soon On 14 February 2012 12:32, kumar raja wrote: > This is an off topic , but because still i am in very need of it i am > asking. > > i have joined in stackoverflow forum, but now it is not letting me to ask > questions as i have posted some inferior quality

[algogeeks] Forums on android

2012-02-13 Thread kumar raja
am really in a need of some forum/ good group which is interactive and let me post my queries to get answers from geeks like this group. please suggest me some of them. -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are

[algogeeks] learning android

2012-01-03 Thread kumar raja
books and video lectures as well. but could not get accustomed to it. so please suggest me some guide lines and quote some resources like this forum where i can post my doubts and get the answers . please guys suggest me some effective measures to complete my project... -- Regards Kumar Raja M.Tech

Re: [algogeeks] Re: Thanks to Algogeeks

2011-12-04 Thread kumar raja
Thank u sir On 5 December 2011 09:27, Dave wrote: > @Kumar. Congratulations. Happy to be of help. > > Dave > > On Dec 4, 12:49 pm, kumar raja wrote: > > I am selected in Oracle Server Technologies today > > > > The questions are not much from algorithms &g

[algogeeks] Thanks to Algogeeks

2011-12-04 Thread kumar raja
I am selected in Oracle Server Technologies today The questions are not much from algorithms But i have learned a lot of things from this group on algorithms Especially Dave sir Thanks once again -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this

Re: [algogeeks] Removing Duplicates In array and Linked list

2011-12-02 Thread kumar raja
m. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to

[algogeeks] Re: Removing Duplicates In array and Linked list

2011-12-01 Thread kumar raja
Please help me in solving above quesitons On 1 December 2011 08:33, kumar raja wrote: > 1) In there any way to remove duplicates in Integer array in linear time > using constant space?? > > i dont want the Hash based solution > > > 2) Is there anyway to remove the dup

[algogeeks] Removing Duplicates In array and Linked list

2011-12-01 Thread kumar raja
1) In there any way to remove duplicates in Integer array in linear time using constant space?? i dont want the Hash based solution 2) Is there anyway to remove the duplicates elements from an unsorted linked list in * Single Pass*??? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur

Re: [algogeeks] Re: Finding Minimum Triplet

2011-11-29 Thread kumar raja
he distance of a triplet (a,b,c) is defined is *max*(|a-b|, |b-c|, |c-a|) is the correct one... On 29 November 2011 11:09, atul anand wrote: > @Raja : distance is defined as > > The distance of a triplet (a,b,c) is defined is *max*(|a-b|, |b-c|, |c-a|) > > OR > > The dista

Re: [algogeeks] Finding frequent words

2011-11-29 Thread kumar raja
lay trees > > On Tue, Nov 29, 2011 at 10:07 PM, kumar raja wrote: > >> You get a stream of words, find top m frequent words. >> >> What are all the possible approaches for this problem ?? >> >> -- >> Regards >> Kumar Raja >> M.Tech(SIT) >

Re: [algogeeks] Re: Finding Minimum Triplet

2011-11-29 Thread kumar raja
ere n = max(na,nb,nc). > > Dave > > On Nov 29, 11:42 am, kumar raja wrote: > > Given three arrays, find the triplet (containing one element from each > > array) with the minimum > > distance. The distance of a triplet (a,b,c) is defined is max(|a-b|, > |b-c|, >

[algogeeks] Finding Minimum Triplet

2011-11-29 Thread kumar raja
Given three arrays, find the triplet (containing one element from each array) with the minimum distance. The distance of a triplet (a,b,c) is defined is max(|a-b|, |b-c|, |c-a|) -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are

[algogeeks] Finding frequent words

2011-11-29 Thread kumar raja
You get a stream of words, find top m frequent words. What are all the possible approaches for this problem ?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" grou

Re: [algogeeks] Pattern matching

2011-11-29 Thread kumar raja
Can it be solved using Finite automata?? On 29 November 2011 06:46, kumar raja wrote: > @harry > > It is not about using existing regexp matching techniques > > You have to design ur own technique using existing Pattern matching > algorithms to handle this stuff... > >

[algogeeks] What is the difference between Reentrant and Thread Safe code ,please explain with example funcitons..

2011-11-29 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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, sen

Re: [algogeeks] Pattern matching

2011-11-29 Thread kumar raja
legroups.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 Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You

[algogeeks] Pattern matching

2011-11-29 Thread kumar raja
string pattern matching with reg exp. ex: str : abccdefpattern : bc*dk* should return true; because bccd is subset of str. -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm

[algogeeks] What is the difference between portability and Platform Independence??

2011-11-27 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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, sen

Re: [algogeeks] One small doubt??

2011-11-26 Thread kumar raja
t with > reference to other elements.same goes for list. > > On Sun, Nov 27, 2011 at 10:07 AM, kumar raja wrote: > >> Can someone explain the following terms and their differences clearly? >> >> 1) Array and List >> >> 2) Ordered arr

[algogeeks] One small doubt??

2011-11-26 Thread kumar raja
Can someone explain the following terms and their differences clearly? 1) Array and List 2) Ordered array and Unordered Array 3) Ordered List and Unordered List -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are

Re: [algogeeks] Re: Threaded binary tree

2011-11-25 Thread kumar raja
>last->right = tree; > } > last = tree; > if (tree->right) >do_enthreading(tree->right) > } > > // Start the recursion and clean up afterward. > void enthread_tree(NODE *tree) > { > if (tree) { >last = NULL; >do_enthreading(tree);

[algogeeks] Threaded binary tree

2011-11-25 Thread kumar raja
How to convert a given binary tree into threaded binary tree?? what is the algorithm... -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this g

Re: [algogeeks] Re: Finding the repeated element

2011-11-24 Thread kumar raja
@Anup: Atleast u tell me how the M has formed??? On 24 November 2011 11:21, Anup Ghatage wrote: > @kunzmilan > Nice idea, how do you decide the row-size or column-size of the matrix? > > > On Thu, Nov 24, 2011 at 8:00 PM, kumar raja wrote: > >> @kunzmilan : >> Can

Re: [algogeeks] Xor Linked lists

2011-11-24 Thread kumar raja
@rahul: when i tried the following i got an error int a=3,b=2; printf("%p", (&a)^(&b)); On 24 November 2011 06:28, rahul sharma wrote: > address can be xored easily with xor operator... > > http://www.geeksforgeeks.org/archives/12367 > > On Thu, Nov 24,

Re: [algogeeks] Re: Finding the repeated element

2011-11-24 Thread kumar raja
@kunzmilan : Can u please maintain the clarity ?? How did u find the M if the list is 4 2 8 9 5 1 9 how M looks like ?? please elaborate it... On 24 November 2011 06:15, kunzmilan wrote: > > > On 24 lis, 09:09, kumar raja wrote: > > @kunzmilan : i did not get u, once expla

[algogeeks] Xor Linked lists

2011-11-24 Thread kumar raja
rules to follow during insert,delete and search -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegrou

Re: [algogeeks] Re: Finding the repeated element

2011-11-24 Thread kumar raja
t; > On Thu, Nov 24, 2011 at 6:59 PM, kumar raja wrote: > >> @ravu sairam: >> >> Suppose the hashing is banned ,now what is ur solution??? >> Hashing is quite theoretical concept with time complexity O(1). >> >> But it will not be the case every time.so sug

Re: [algogeeks] Re: Finding the repeated element

2011-11-24 Thread kumar raja
gt; 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 Kumar Raja M.Tech(SIT) IIT Kharagpu

Re: [algogeeks] Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted

2011-11-24 Thread kumar raja
s group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeek

Re: [algogeeks] Re: Finding the repeated element

2011-11-24 Thread kumar raja
@kunzmilan : i did not get u, once explain with example... On 23 November 2011 23:47, kunzmilan wrote: > > > On 24 lis, 07:02, kumar raja wrote: > > In the given array all the elements occur single time except one element > > which occurs 2 times find it in O(n

Re: [algogeeks] Finding the repeated element

2011-11-23 Thread kumar raja
ing the array using median > selection algorithm ( a varient of quicksort) and then comparing to > find the elements. > > Cheers, > > Ankit!!! > > On Thu, Nov 24, 2011 at 11:32 AM, kumar raja > wrote: > > In the given array all the elements occur single time except o

[algogeeks] Finding the repeated element

2011-11-23 Thread kumar raja
space" -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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

Re: [algogeeks] Re: Maximize Subsquare

2011-11-23 Thread kumar raja
> For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To po

Re: [algogeeks] Re: Maximize Subsquare

2011-11-22 Thread kumar raja
; Somnath Singh >> >> -- >> 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 >&g

Re: [algogeeks] Re: Soritng

2011-11-21 Thread kumar raja
Sort doesnt require any swapping . So , for 3 my answer wud >> be Merge Sort >> >> On Mon, Nov 21, 2011 at 11:55 AM, Dave wrote: >> >>> @Kumar: For question 1, the answer is radix sort. It doesn't use data >>> comparisons at all. >>> >>&g

[algogeeks] Soritng

2011-11-20 Thread kumar raja
minimizes the cost, i want the answer in general case ,not for this particular array. it is also called least distance sorting -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups "Algorithm

[algogeeks] K-way merging...

2011-11-20 Thread kumar raja
Is k-way merging works same as Heap merging method or using tournament tree?? But how to construct a tournament tree in the programming?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups

[algogeeks] Binary Trees and BSTs

2011-11-17 Thread kumar raja
Is this correct??? Number of binary trees possible with 'n' nodes is Catalan Number C(2n,n)/ (n+1) . Number of BST is 2^n -n i doubt the second one .someone fix my thought... -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message b

[algogeeks] what will be the focus of yahoo in written exam ,what to study for it. please respond ASAP..

2011-11-09 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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, sen

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-08 Thread kumar raja
Thanks rahul On 8 November 2011 03:32, rahul sharma wrote: > apti + technical + 3 prog (mainly linked list) > > On Tue, Nov 8, 2011 at 3:09 PM, kumar raja wrote: > >> >> >> -- >> Regards >> Kumar Raja >> M.Tech(SIT) >> IIT Kharagpur, >&

[algogeeks] About suffix trees and suffix arrays

2011-11-08 Thread kumar raja
.. -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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 algogeek

[algogeeks] Finding the indexes of a repeated element??

2011-11-08 Thread kumar raja
How to find the indexes of a repeated element in the sorted array in *log n*time.. e.g. a: 1 3 4 4 5 6 7 8 8 9 9 9 10 x=9 ouput is 10 and 12 (indexing from 1) -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are

[algogeeks] Does anyone know the written pattern of Amazon??

2011-11-08 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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, sen

Re: [algogeeks] Re: Given a node of BST make it the root

2011-10-31 Thread kumar raja
> 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 Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received th

Re: [algogeeks] Re: Intersection of arrays

2011-10-28 Thread kumar raja
whatever. How >>> you determine if an element in array 2 intersects with an >>> element of array >>> 1 will depend on how you store your sorted array. You might do >>> a linear >>> search or a binary search or a bucket search

Re: [algogeeks] Re: Hash Table

2011-10-27 Thread kumar raja
I am asking for the above quesiton On 27 October 2011 07:38, kumar raja wrote: > @Prem : > So is the time complexity is O(1) or O(log n) or O(n)??? > > > On 27 October 2011 07:28, Prem Krishna Chettri wrote: > >> Well, if we talk abt space complexity in Hash.. M srr

Re: [algogeeks] Re: Hash Table

2011-10-27 Thread kumar raja
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.co

Re: [algogeeks] Re: Hash Table

2011-10-27 Thread kumar raja
glegroups.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, se

Re: [algogeeks] Intersection of arrays

2011-10-25 Thread kumar raja
ans > that..it is present in all the arrays..preceding it) > now search the hash table..in which element count is equal to K > > > On Tue, Oct 25, 2011 at 11:47 AM, kumar raja wrote: > >> Find intersection of K unsorted array of N elements each. Intersection >> consist

[algogeeks] Questions on Hashing ...Share ur ideas...

2011-10-25 Thread kumar raja
N. Problem 8: Given a file with N integers. Find top K most frequent integers. Assume N to be very large such that all the N numbers cannot fit into memory. Design for the worst case. -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message bec

Re: [algogeeks] Intersection of arrays

2011-10-25 Thread kumar raja
ly if its > count value in hash table is one less then the array no.(which means > that..it is present in all the arrays..preceding it) > now search the hash table..in which element count is equal to K > > > On Tue, Oct 25, 2011 at 11:47 AM, kumar raja wrote: > >> Find i

[algogeeks] Intersection of arrays

2011-10-24 Thread kumar raja
Find intersection of K unsorted array of N elements each. Intersection consists of elements that appear in all the K arrays. what data structure is useful here?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to

[algogeeks] Hash Table

2011-10-24 Thread kumar raja
I have read that Hash table provides storing/search operations in constant time. Is it true?? How to prove it?? I have not found any sort of proof for it... -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the

[algogeeks] Re: Hash Table

2011-10-24 Thread kumar raja
When the number of elements increases gradually ,the complexity must increase .so it the situtaion is like it has to store all the 'n' elements then all the basic operations require O(log n) time.so how it is constant always i am not getting... On 24 October 2011 22:15, kumar raja w

Re: [algogeeks] Re: Code it...

2011-10-18 Thread kumar raja
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 Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp

[algogeeks] Code it...

2011-10-16 Thread kumar raja
you have to write a program which tell about how many times it has run. ex: if you run first time it will print 1. if you run second time it will print 2. like this. -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed

[algogeeks] I want "Pointers in C" ebook. please forward it

2011-10-15 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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, sen

[algogeeks] Permuations and Combinations

2011-09-22 Thread kumar raja
selection). what is the time complexity of the algorithm?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in 7797137043. 09491690115. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, sen

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

2011-09-22 Thread kumar raja
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 Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in 7797137043.

Re: [algogeeks] Re: google maps

2011-09-20 Thread kumar raja
his group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in 7797137043. 09491690115. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post

[algogeeks] I want resources to learn algorithms on Permutation and Combination problems and Graph algorithms except CLRS..

2011-09-16 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in 7797137043. 09491690115. -- 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

Re: [algogeeks] Exchanging bit values in a number

2011-09-13 Thread kumar raja
@Dave and Gene sorry , i mean ur solutions are brilliant ,but i did not get those kind of ideas till now.. On 13 September 2011 12:31, kumar raja wrote: > @Dave and Gene > > I am totally awkward at ur solutions ...How did u develop these solutions?? > . Can u please quote some mate

Re: [algogeeks] Exchanging bit values in a number

2011-09-13 Thread kumar raja
d 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

[algogeeks] Exchanging bit values in a number

2011-09-13 Thread kumar raja
ggest some effective way to do this... -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in 7797137043. 09491690115. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

Re: [algogeeks] output

2011-09-13 Thread kumar raja
u 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.goog

Re: [algogeeks] Circular Left shift

2011-09-10 Thread kumar raja
gt; On Sat, Sep 10, 2011 at 7:15 AM, kumar raja wrote: > >> @sarath: >> I did not get u .Could u please explain it with the example. >> >> >> On 10 September 2011 03:39, sarath prasath wrote: >> >>> consider this approach.. >>> first reverse t

  1   2   >