Search:

Type: Posts; User: adamniazi

Search: Search took 0.12 seconds.

  1. Replies
    10
    Views
    1,935

    [SOLVED] Re: Compress DNA sequence using recursion

    Thanks for the help, I got it working and posted the working code above.
  2. Replies
    10
    Views
    1,935

    [SOLVED] Re: Compress DNA sequence using recursion

    test class:


    public class Test{
    public static void main(String[] args){
    String a1 = "";
    String b1 = DNA.compress(a1);
    System.out.println(b1);

    String a3 = "Cat";
  3. Replies
    10
    Views
    1,935

    [SOLVED] Re: Compress DNA sequence using recursion

    these are the tests i'm running, from a different class

    String a1 = "";
    String b1 = DNA.compress(a1);
    System.out.println(b1);

    String a3 = "Cat";
    String b3 =...
  4. Replies
    10
    Views
    1,935

    [SOLVED] Re: Compress DNA sequence using recursion

    So I've got pretty much everything working, except when I start getting double digits. The new code is at the bottom and the part that handles the double digits is bolded. I've code it working well...
  5. Replies
    10
    Views
    1,935

    [SOLVED] Re: Compress DNA sequence using recursion

    I've modified to code to not give ArrayIndexOutOfBoundsException anymore. But it is still not giving me the correct output. Some letters seem to disappear or get added to ones that dont match.

    new...
  6. Replies
    10
    Views
    1,935

    [SOLVED] Compress DNA sequence using recursion

    I am suppose to create a recursive method that will compress a DNA sequence. For example;
    DNA.compress("GGCcCTtttTT") => "G2C3T6"

    but my code keeps giving me an...
Results 1 to 6 of 6