u forgot to do inplace and you have wrong conversion of count
On Sat, May 26, 2012 at 11:31 AM, Anchal Gupta anchal92gu...@gmail.comwrote:
hey, here is the function that do the compression and store the output
in an array op.
void str_comp(char *str)
{
int count=0,j=0,i;
char
yeah i forgot inplace so to do that we simply add count and ch in str
input array instead of op.
btw whats wrong with count it give me right answer.
On May 26, 12:08 pm, Hassan Monfared hmonfa...@gmail.com wrote:
u forgot to do inplace and you have wrong conversion of count
On Sat, May 26,
1- try abb
On Sat, May 26, 2012 at 12:07 PM, Anchal Gupta anchal92gu...@gmail.comwrote:
yeah i forgot inplace so to do that we simply add count and ch in str
input array instead of op.
btw whats wrong with count it give me right answer.
On May 26, 12:08 pm,
http://michael.dipperstein.com/rle/index.html
and basic one is
http://www.fileformat.info/mirror/egff/ch09_03.htm
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Sat, May 26, 2012 at 1:10 PM, Hassan Monfared hmonfa...@gmail.comwrote:
1- try
Implement an algorithm to do wild card string matching
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Design a logWritter for server kind of application
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
match(*input , *pattern)
if(*pat == 0)
return true;
if('?' == *pat)
return match(input+1,pat+1) || match(input,pat+1)
if('*' == *pat)
return match(input+1,pat) || match(input,pat+1)
if(*text == *pat)
return
typo error above resolved :-
match(*input , *pattern)
if(*pat == 0)
return true;
if('?' == *pat)
return match(input+1,pat+1) || match(input,pat+1)
if('*' == *pat)
return match(input+1,pat) || match(input,pat+1)
if(*input == *pat)
This is called Run-Length-Encoding (RLE) of a string.
Its purpose is to save space.So in case of abcdef,I think the output needed
is abcdef (1 is implicit).
The added benefit is it makes the solution in-place.
Approach:- (In-place and Linear Time)
Start from the left of string and
More posts:
http://marathoncode.blogspot.com.br/2012/04/list-comprehension-and-generator.html
http://marathoncode.blogspot.com.br/2012/04/floating-point-arithmetic-with.html
http://marathoncode.blogspot.com.br/2012/05/algoritmos-gulosos.html
This will work in fine, but multiplying primes requires arbitrary
precision arithmetic for keys of any significant length.
You don't need to compute a hash at all. Just maintain two buffers
long enough to hold the longest word and an O(n) sort like counting
sort. If you are using Latin (8-bit)
11 matches
Mail list logo