Re: [algogeeks] Re: Generating mazes

2013-02-08 Thread Anup Ghatage
3:51 AM, Don wrote: > I believe that this will generate a maze with multiple cycles, which > violates the requirement stated in the initial question that the maze > have exactly one solution. > > On Feb 6, 11:53 am, Anup Ghatage wrote: > > There is another algorithm.. T

Re: [algogeeks] Re: Generating mazes

2013-02-06 Thread Anup Ghatage
ve the logic of your rnd() function? > > -- > 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...@googlegroup

Re: [algogeeks]

2011-12-05 Thread Anup Ghatage
isit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anup Ghatage -- 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 gro

Re: [algogeeks] Anagrams

2011-11-29 Thread Anup Ghatage
egroups.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. > > -- Anup Ghatage -- You received this message because you are subscribed to

Re: [algogeeks] Interview question

2011-11-29 Thread Anup Ghatage
gt; "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=e

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
Correction: Upon the frequency of an element it's BROUGHT UP closer to the root. On Wed, Nov 30, 2011 at 6:39 AM, Anup Ghatage wrote: > Splay Trees are self modifying trees. > Upon the frequency of an element it's not is brought up closer to the root. > > So in a cont

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
umar raja wrote: > @Anup: > > How splay trees come into picture here?? I think TRIE or Hashtable will > work out. > > But it is difficult to conceive the TRIE solutions and explain it to the > Interviewer .so i am looking for something else better and concrete one. > > > O

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anup Ghatage -- 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] Re: Finding the repeated element

2011-11-24 Thread Anup Ghatage
gt; > >> > -- >> > 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&q

Re: [algogeeks] An Array Problem

2011-11-22 Thread Anup Ghatage
stored in sorted order. Get > a new element from array and lets call this number as m. Push m into the > stack. Now, find all elements which are <= (m-1) using binary search. Pop > out all these elements and assign the value m in the output array. Elements > remaining at the end will

Re: [algogeeks] An Array Problem

2011-11-22 Thread Anup Ghatage
algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group

Re: [algogeeks] Amazon Onsite Chennai SDE

2011-11-14 Thread Anup Ghatage
quot;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.c

Re: [algogeeks] difference btw int *a[] and int (*a)[]

2011-11-13 Thread Anup Ghatage
p://groups.google.com/group/algogeeks?hl=en. > > -- Anup Ghatage -- 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

Re: [algogeeks] Re: kth smallest element

2011-11-10 Thread Anup Ghatage
For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anup Ghatage -- 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 uns

Re: [algogeeks] Re: Median of 2D matrix

2011-11-08 Thread Anup Ghatage
>> > > > > > > and use the well known O(N) median selection algorithm to get >> a median >> > > > > > > of this. This has the quality we want of being somewhere >> roughly in >> > > > > > > the middle half of the remaini

Re: [algogeeks] Median of 2D matrix

2011-11-02 Thread Anup Ghatage
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/al

Re: [algogeeks] Microsoft Question

2011-10-31 Thread Anup Ghatage
options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anup Ghatage -- 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 unsubscrib

Re: [algogeeks] Dp solution for this problem?

2011-10-30 Thread Anup Ghatage
ibe 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. > -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorithm Geek

Re: [algogeeks] Re: Intersection of arrays

2011-10-28 Thread Anup Ghatage
"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. >

Re: [algogeeks] Re: Intersection of arrays

2011-10-27 Thread Anup Ghatage
) > > 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 em

Re: [algogeeks] Re: Questions

2011-10-27 Thread Anup Ghatage
. > 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. > > -- Anup Ghatage -- You re

Re: [algogeeks] Searching In a large file

2011-10-27 Thread Anup Ghatage
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, vis

Re: [algogeeks] Re: Array Problem??

2011-10-03 Thread Anup Ghatage
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,

Re: [algogeeks] Google Interview Question

2011-10-01 Thread Anup Ghatage
oogle 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

Re: [algogeeks] Amazon Interview Question

2011-09-23 Thread Anup Ghatage
.@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algog

Re: [algogeeks]

2011-09-22 Thread Anup Ghatage
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. > -- Anup Ghatage -- You received t

Re: [algogeeks] DS QUESTION

2011-09-18 Thread Anup Ghatage
age 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 &

Re: [algogeeks] Microsoft Question

2011-09-18 Thread Anup Ghatage
> > > On Sat, Sep 17, 2011 at 8:30 AM, Anup Ghatage wrote: > >> As WgpShashank once pointed out. >> >> Search the whole matrix for the first character instances, for each >> instance, send the array, string and that char's position to a function that >&g

Re: [algogeeks] c output

2011-09-18 Thread Anup Ghatage
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 gro

Re: [algogeeks] How one can measure time spent in context switch??

2011-09-17 Thread Anup Ghatage
mail 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. > -- Anup Ghatage -- You received this message because you are subsc

Re: [algogeeks] Microsoft Question

2011-09-16 Thread Anup Ghatage
re 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://gro

Re: [algogeeks] Find the output

2011-09-16 Thread Anup Ghatage
5} >> a >>&a >> a+1 >> &a+1 >> &a is address of whole array...so &a+1 means next element after array >> completion. >> >> so ptr-1 will point to 5 >

Re: [algogeeks] Re: no of elements of the array

2011-09-16 Thread Anup Ghatage
"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] Find the output

2011-09-16 Thread Anup Ghatage
#include int main() { int a[5]={1,2,3,4,5}; int *ptr=(&a + 1); printf("%d %d\n",*(a+1),*(ptr-1)); return 0; } Find the output! -- 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. T

Re: [algogeeks] C++ Query...

2011-09-16 Thread Anup Ghatage
mail 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. >>> >> >> -- >&

Re: [algogeeks] OS

2011-09-14 Thread Anup Ghatage
isit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anup Ghatage -- 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] Re: Returning 0 with probability p and 1 with probability 1-p

2011-09-12 Thread Anup Ghatage
gogeeks@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. > > -- Anup Ghatage -- You received this message because you are sub

Re: [algogeeks] Re: Questions -->

2011-09-11 Thread Anup Ghatage
gorithm 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. > &g

Re: [algogeeks]

2011-09-09 Thread Anup Ghatage
or more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anup Ghatage -- 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 uns

Re: [algogeeks] informatica pattern and question of interview

2011-09-09 Thread Anup Ghatage
gt; > -- > 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. >

Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Anup Ghatage
Here is another one. Pardon me if it goes by some other name. Divide the array in K parts. Find the Maximum in each of these parts and store it in an array of size K. Find the Minimum in K to find the K'th max. Total Time Complexity = O ( n + k ) where 0 <= k <= n -- Anup Ghata

Re: [algogeeks] EOF

2011-09-06 Thread Anup Ghatage
You can quite easily map this problem to that of a typical client-server protocol. You don't know the size of the data, and the all packets will be of a certain size, possibly, except the last one. So the solutions provided for that problem might apply to some cases of this! -- Anup Gh

Re: [algogeeks] IP Address

2011-09-06 Thread Anup Ghatage
> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks&quo

Re: [algogeeks] MICROSOFT

2011-09-05 Thread Anup Ghatage
le , we don't give the size of >> the table ahead ... It decides some size, and implements.. when we cross the >> assumed size,then it again gives some more memory so that all the operations >> are optimum (less collisions). >> >> >> On Sun, Sep 4, 2011 a

Re: [algogeeks] MICROSOFT

2011-09-04 Thread Anup Ghatage
2 in worst case. So the algorithm would be O( m^2 log m ) just to populate the hash and find the frequencies. -- Anup Ghatage -- 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

Re: [algogeeks] Min no of moves

2011-09-04 Thread Anup Ghatage
That's interesting. when n = 3 We have been given this :F F F | E E E Swap the middle element and it becomes: F E F | E F E Which is what you want, but when n = 5 F F F F F | E E E E E And you swap the middle element it becomes: F F E F F | E E F E E So the same startegy doesn't apply. But

Re: [algogeeks] MICROSOFT

2011-09-04 Thread Anup Ghatage
Just a quick note to the above solution. If the tree is a binary search tree and you are going to put it in an array after an inorder traversal, the elements will be sorted, so to find the k'th max just access the n-k'th element -- You received this message because you are subscribed to the Goog

Re: [algogeeks] Tejas networks

2011-09-04 Thread Anup Ghatage
Could you please give an example for question 3? -- 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...@googlegroup

Re: [algogeeks] very urgent .. help

2011-09-04 Thread Anup Ghatage
What is the purpose of this elitmus test? Does scoring good in it qualify you for something? -- 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: whats d problem wid using gets?

2011-09-03 Thread Anup Ghatage
I had once read somewhere that they had used gets() during the first compilations of unix, and it used to always crash for some test cases. So after that they stopped using it and alerted everyone of the problem.. -- You received this message because you are subscribed to the Google Groups "Algo

Re: [algogeeks] MICROSOFT

2011-09-03 Thread Anup Ghatage
Sort the given array first. : O(n logn) You'll have: {2,3,3,5,5,5} First parse all the elements in the array and identify the unique ones and store the count in N Now create a two dimensional array A[N][2]; Store the number in A[0][0] and store its frequency in A[0][1] etc. : O (n) Now, reverse

Re: [algogeeks] Book Request <>

2011-09-03 Thread Anup Ghatage
^ +1 -- 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

Re: [algogeeks] c question

2011-09-03 Thread Anup Ghatage
Isn't it obvious now? -- 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, vi

Re: [algogeeks] arrays in c

2011-09-03 Thread Anup Ghatage
In other words, The original array identifer, and hence the pointer, is a constant pointer. -- 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] c question

2011-09-03 Thread Anup Ghatage
See, a is defined in main() therefore its scope is limited to main(). It is stored probably in main()'s stack When you pass it to a function as a pointer. You don't make a copy of 'a' onto the function's stack. The only way you can view, manipulate it is using a pointer, and that pointer is your on

Re: [algogeeks] Find the Max from each sub-array of size k

2011-09-02 Thread Anup Ghatage
I just checked Shashank's blog post. The Deque solution is awesome :) -- Anup Ghatage -- 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 t

[algogeeks] Find the Max from each sub-array of size k

2011-09-01 Thread Anup Ghatage
Given an unsorted Array A and any integer k where k <= size of A Print the maximum of each sub-array of size k of A. eg: A = [ 3, 5, 1, 9, 0, 4, -1, 7 ] k = 4 Max: 9 9 9 9 7 -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorit

Re: [algogeeks] microsoft interview

2011-08-31 Thread Anup Ghatage
How about we go column-wise first. Search for a '1' in each row, if found, make it a '2' and all the elements below that, in that column '1' 1 0 0 1 2 0 0 2 0 0 1 0 > 1 0 2 1 0 0 0 0 1 0 1 1 Now search for a '2' in each row and if it is present make each element in that row except

Re: [algogeeks] Amazon written test ques

2011-08-30 Thread Anup Ghatage
So, in short, find all permutations for a given string and create a linked list from them? -- Anup Ghatage -- 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 unsubs

Re: [algogeeks] Re: Find square root a number

2011-08-30 Thread Anup Ghatage
Anyone interested in laying out the trade off's of the Babylonian method vs Newton Raphson? -- Anup Ghatage -- 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.

Re: [algogeeks] convert a string into another in minimum number of steps

2011-08-29 Thread Anup Ghatage
Possibly a case of finding the longest common sub-sequence and then doing the insertions/deletions etc or AKA Levenshtein distance / Edit Distance -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this g

Re: [algogeeks] Re: There is an array and the distance between any two consequent elements is one(+1 or -1) and given a number. You have to check whether the number is in array or not with minimum com

2011-08-29 Thread Anup Ghatage
@Dave Your algo's average case working should be better than a naive O(n).. -- Anup Ghatage -- 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

Re: [algogeeks] Re: There is an array and the distance between any two consequent elements is one(+1 or -1) and given a number. You have to check whether the number is in array or not with minimum com

2011-08-29 Thread Anup Ghatage
@tech Could you give an example for this? If I've understood the question correctly, if we are not allowed duplicates in the array the array turns out to be sorted. If we are allowed duplicates, do we return the first occurrence ? @Dave What would be the complexity of your solution? -- You recei

Re: [algogeeks] C puzzle

2011-08-29 Thread Anup Ghatage
photo/my-images/202/treeexpl.png/ -- Anup Ghatage -- 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 alg

Re: [algogeeks] C puzzle

2011-08-29 Thread Anup Ghatage
@Rajeev: I had written down the recursion tree on paper but since you said that there were 10 reds and greens, I compiled the code and checked it myself. I'm afraid you are wrong my friend. The correct answer is indeed 6 RED and 10 GREEN calls. -- Anup Ghatage -- You received this me

Re: [algogeeks] C puzzle

2011-08-29 Thread Anup Ghatage
If I'm not mistaken, red() will be called 6 times and green() will be called 10 times. -- 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 emai

Re: [algogeeks] Re: puzzle

2011-08-26 Thread Anup Ghatage
Check this out: Tie it at the 200th meter mark. Throw the 150mt rope down. Climb down to the 100th meter pole. Tie the rope there from the middle, and not the end. So what you have is a 150 mt rope that is tied at 200 mt mark, 100 mt mark and 50 mts of the rope from 100 mt marks is hanging. Now

Re: [algogeeks] vertical sum

2011-08-25 Thread Anup Ghatage
On Thu, Aug 25, 2011 at 8:06 PM, Shravan Kumar wrote: > @Anup > > Can you please elaborate why it will not work? > > > On Thu, Aug 25, 2011 at 8:02 PM, Anup Ghatage wrote: > >> Naren: >> It wont work for tree's of level > 3 and non-complete binary tre

Re: [algogeeks] vertical sum

2011-08-25 Thread Anup Ghatage
25. > > > -- > 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...@googlegro

Re: [algogeeks] finding string in matrix grid

2011-08-25 Thread Anup Ghatage
Hey, Tell me if this assumption of the problem statement is correct.. String: ram Matrix: |r | a b |a | g h |m| j d This is vertical and similar for its horizontal counter part... So the logic is more than obvious, For vertical (and horizontal), do a sub-string search column-wise and (row-

Re: [algogeeks] Suggestion

2011-08-25 Thread Anup Ghatage
nd 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. > -- Anup Ghatage -- You received this message because

Re: [algogeeks] Re: Citrix C Question

2011-08-25 Thread Anup Ghatage
eeks" 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. > > -- Anup Gha

Re: [algogeeks] Re: Remove all Duplicates Words

2011-08-24 Thread Anup Ghatage
Actually, this method will be O(n) for any number of occurrences of a single word, but It will go into O(n^2) for multiple occurrences of multiple words. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to alg

Re: [algogeeks] C Trick

2011-08-24 Thread Anup Ghatage
to >>>> algogeeks+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/algogeeks?hl=en. >>>> >>> >>> >>> >>> -- >>> Thanks and Regards >>> VIKAS SINGH >>

Re: [algogeeks] C Trick

2011-08-24 Thread Anup Ghatage
lgorithm 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. > --

Re: [algogeeks] Remove all Duplicates Words

2011-08-24 Thread Anup Ghatage
How about this, We compare the first character with every character except the characters in the word itself, if there is a hit, it might be a word which is a duplicate. So from there on, compare each of the following characters till there is a white space or new line character. If there is no matc