Search:

Type: Posts; User: angstrem

Search: Search took 0.13 seconds.

  1. Replies
    6
    Views
    2,066

    Re: Removing redundancy from String

    Say, you have string "12345". Say, i = 4 (that is, tf.charAt(i) == '5').
    Now look at the code that checks all the substring:


    for (int k=0;k<i;k++)
    if(tf.charAt(i)!=tf.charAt(k))...
  2. Replies
    6
    Views
    2,066

    Re: Removing redundancy from String

    Why not to follow the following algorithm:
    1. For a given character, check all the substring before this character
    2. If the substring does not contain this character - print it
    3. Repeat (1) -...
  3. Replies
    6
    Views
    2,066

    Re: Removing redundancy from String

    What happens if i + z > tf.length?
Results 1 to 3 of 3