Ad
  • Default User Avatar

    Nice solution, but for loop should have $i set to min($last - 1, floor(sqrt($remain))) since sqrt($remain) is highest possible number thats square is lover than remain and will prevent testing arrays like [49, 48, 47, 46, 45, ...]

  • Default User Avatar

    Since I saw solution, where is detected if "-" or "_" is used as separator, i think, it would be nice to add some tests like toCamelCase("i-am_a-programmer");
    (But I have no idea how or where, since I never done this before)