2n!/n!(n+1)!
catalan number
also asked by directi in written ...
wasim akram
MCA 3rd year
--
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
@Debanjan Thanks for correcting this.
On Tue, Oct 13, 2009 at 5:12 PM, Debanjan wrote:
>
> On Oct 13, 12:05 pm, Raghavendra Sharma
> wrote:
> > For the first problem.
> >
> > All occurrence of a duplicate character in a word.
> >
> > void RemoveDuplicates(char *word) {
> > int count[256] = {0
On Sep 8, 10:47 am, yash wrote:
> wap a program in efficient manner to remove all occurrence of
> duplicate character in the word and all occurrence of duplicate word
> in the file.
>
> i break the problem in two section( this is my approach it may be
> better one )
>
> wap to remove all duplicat
On Sep 8, 10:47 am, yash wrote:
> wap a program in efficient manner to remove all occurrence of
> duplicate character in the word and all occurrence of duplicate word
> in the file.
>
> i break the problem in two section( this is my approach it may be
> better one )
>
> wap to remove all duplicat
On Oct 13, 12:05 pm, Raghavendra Sharma
wrote:
> For the first problem.
>
> All occurrence of a duplicate character in a word.
>
> void RemoveDuplicates(char *word) {
> int count[256] = {0, 0};
> char *p = word;
>
> while ( p ) {
This would be while(*p) {
> count[(int)(*p)] = 1;
>
OOPS sorry the code is not correct.
--~--~-~--~~~---~--~~
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
For the first problem.
All occurrence of a duplicate character in a word.
void RemoveDuplicates(char *word) {
int count[256] = {0, 0};
char *p = word;
while ( p ) {
count[(int)(*p)] = 1;
p++;
}
p = word;
char *q = word;
while ( q ) {
if ( count[*q] ) {
*p = *q;
Hashing for words,
and a mapping to ASCII values for characters (make array of size
256... if (A[(int)string[i]] == 0), an original char, A[(int)string[i]]
++, else a duplicate char)
Go through string and delete duplicate chars and when you reach the
end of a word hash it and add it to output if
You can use a hash map. What do u mean by preserving order?
Keep inserting the characters into hash, whenever u find a duplicate,
delete it. The order is maintained still. Can you please elaborate on
what is mean by preserving order?
On Sep 8, 10:47 am, yash wrote:
> wap a program in efficient