Ad
  • Custom User Avatar

    Sorry for late reply.

    Your if statement is wrong. After sorting the array (example) [1,2,3,2,1], it looks like this [1,1, 2, 2, 3]. But your if statement does this:
    if ( 1 == 1 && 1 != 2){returns true} (1 == 2 && 1 != 2){returns false} and so on...

  • Custom User Avatar

    Very helpful!!

    Ne zameram, s obzirom da mi je prva kata ocekivala sam prepravke. Nisam ocekivala ovako detaljno objasnjenje, hvala ti, nesto sam i naucila! :)

  • Custom User Avatar

    Hvala Stefane, nadam se da je sada ok? Sta su random testovi? Jos uvek nisam pohvatala sve ovde.