Use hash maps...
On Mon, Aug 16, 2010 at 10:06 PM, ashita dadlani ash@gmail.com wrote:
You have a string say foobarfoo in which fo and oo aree repeated
twice.You have to find all such repeated pairs in O(n) time,The string can
only have alphanumeric elements in it.
--
You received this
http://www.ahhf45.com/info/Data_Structures_and_Algorithms/resources/technical_artile/ternary_search_tree/terstree.htm
Refer this link.
On Mon, Aug 16, 2010 at 10:29 PM, Chi c...@linuxdna.com wrote:
I'm not sure what you want. I have post a solution to search for
wildcards in tries. Now you
@maxim . my algo is for array of equal sizes.Sorry I didn't notice the
unequal thing.
On Tue, Aug 17, 2010 at 10:09 AM, Maxim Mercury maxim.merc...@gmail.comwrote:
above algo isnt handling unequal length arrays,
On Aug 13, 10:06 pm, Nikhil Agarwal nikhil.bhoja...@gmail.com wrote:
Check this
Hi Amit,
it is not proven that a ternary-search-tree is faster:
http://nicolas.lehuen.com/category/pytst/
From the article: The difference between pytst and ctst
This gives 11 nodes for 7 strings. I won’t waste time to draw the ternary
search tree equivalent, so you’ll have to trust me, but
Greetings
How many of you guys calculate the time complexity of an algorithm
before implementing it on a day to day basis?
When you review your code, before committing it to the live source
code base, does anybody discuss the time complexity?
Would love to hear your interesting experiences..
yes ofcourse.the efficiency of my code is always a concern to me...
On 17 August 2010 18:54, Ashutosh Tamhankar asshuto...@gmail.com wrote:
Greetings
How many of you guys calculate the time complexity of an algorithm
before implementing it on a day to day basis?
When you review your
I had proposed an algorithm of repeatedly subtracting 1 from the given
number and subsequently adding 1 to the new number initialised to 0,
till the given number becomes 0. However as soon as the digit reaches
the limit , the digit becomes 0 and you add 1 to the next digit. I was
not able to code
Cud any1 tell me hw to implement BFS without a queue?!
--
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
Cud any1 tell hw 2 implement BFS of a tree without queue?!
--
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
@Giri: Could anyone tell how to spell could, anyone, how, and
to?
On Aug 17, 11:23 am, Giri giri.pe...@gmail.com wrote:
Cud any1 tell hw 2 implement BFS of a tree without queue?!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
For 30 years, I developed mathematical software (linear equation
solvers, eigenvalue routines, fast Fourier transforms, etc.) on a wide
variety of high-performance computers with interesting architectures.
For those, the optimal-order algorithms are well known. My principal
goal was to implement a
the point here is not the language.. when you could understand what
those words mean, it serves the purpose.. then sorry itz Breadth First
Traversal ofa tree without using queue.. got it?!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
What you want is a php-traversal of a file-system:
http://devzone.zend.com/article/1235#Heading7
On Aug 17, 7:24 pm, Giri giri.pe...@gmail.com wrote:
the point here is not the language.. when you could understand what
those words mean, it serves the purpose.. then sorry itz Breadth First
Or do you mean without a recursion, without a stack!?
On Aug 17, 7:40 pm, Chi c...@linuxdna.com wrote:
What you want is a php-traversal of a file-system:
http://devzone.zend.com/article/1235#Heading7
On Aug 17, 7:24 pm, Giri giri.pe...@gmail.com wrote:
the point here is not the language..
The Solution is pretty straight forward when you long number is represented
in reverse order in linked list.
If the number is not in reverse order, We need an Explicit stack or we must
Use Recursion .
Other way around this is to construct another parallel linked list along
with Sum(linked list)
Given two arrays of numbers, find if each of the two arrays have the
same set of integers ? Suggest an algo which can run faster than NlogN
without extra space?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
Given an array, find the longest subarray which the sum of the
subarray less or equal then the given MaxSum
int[] FindMaxSumArray(int[] array, int maxsum)
for example, given array: {1, -2, 4, 5, -2, 6, 7}
maxsum=7
the result would be: {1,-2, -2, 6}
--
You received this message because you are
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
finding algo?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Tree *node
for(i=1;i=height;i++)
{
levelorder(node,i);
}
void levelorder(Tree *node,int level)
{
if(level==1)
printf(node-value);
else
levelorder(node-left,level-1)
levelorder(node-right,level-1);
}
--
You received this message because you are subscribed to the Google
Given an array of meetings:
struct meeting {
start_time;
end_time;
bool conflict;
}
Set conflict = True for all meetings that conflict with some other meeting.
Can anyone give a solution of O(NlogN) or less?
--
Shuaib
--
You received this message because you are subscribed to the Google
20 matches
Mail list logo