79219644

Date: 2024-11-24 08:30:09
Score: 1
Natty:
Report link

Many thanks to @MikeM. for suggestions (if you want to post an answer I will accept it)

I changed the code to say explicitly

java.util.Collections.reverse(dataToIncrease)
return dataToIncrease.toMutableList()

...and that compiles and runs fine under sdk 35!

The IDE suggested changing the static call with the kotlin stdlib so now I have

dataToIncrease.reverse()
return dataToIncrease.toMutableList()

I looked up what the difference between "reverse and "reversed" is and it seems reversed always returns a read-only result....since I don't ever write to the results I get from this function - I instead copy them, it seems that this code will work well for me.

Thanks for your help!

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-0.5): Thanks for your help
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @MikeM
  • Self-answer (0.5):
Posted by: Kibi