Picking Numbers

  • + 1 comment

    question asks "longest subarray" that should be continuous elements from the original array, so not allowed to change order. Thats what the example shows. Then on input: 1 2 2 3 1 2 expected answer: 5.

    Thats for sure wrong. Question worded incorrectly. After sorting the inputarray my sollution passes. So the question means SUBSET: any combination of elements regardless of order or position