1. Hey Guest Did you know you can win an Honor 10 phone worth ₹33,000 and an additional ₹70,000 in paytm vouchers, just by replying to some threads and taking part in the discussions happening in the Honor Hub?

    What are you waiting for? Start commenting and start winning! Remember to read the instructions posted here.

    Dismiss Notice

c program

Discussion in 'QnA (read only)' started by saro_gn, Feb 4, 2006.

Thread Status:
Not open for further replies.
  1. saro_gn

    saro_gn New Member

    Joined:
    Jul 27, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    coimbatore
    hai,
    pls any one give the program.

    Design and implement an efficient algorithm to remove consecutive 1char, 2char, 3 char... so on recurrences in dictionary words.
    For example, "abbabccbc" first will become "ababcbc", then become "abc". Similarly, "abcaab" will become "abcab" and but stays as it is after that. You need to output only the last string ("abc" and "abcab" for the above two examples).

    bye.,
    saravana.
     
  2. sakumar79

    sakumar79 Active Member

    Joined:
    Nov 28, 2004
    Messages:
    2,441
    Likes Received:
    9
    Trophy Points:
    38
    Location:
    Madurai
    Use recursion until number of characters to be compared is more than half the length of the string...

    Please dont ask others to write the program for you... Get the algorithm and work it out yourselves... That is the correct way to learn...

    Arun
     
Thread Status:
Not open for further replies.

Share This Page