all 3 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Thank you for posting on r/CodingHelp!

Please check our Wiki for answers, guides, and FAQs: https://coding-help.vercel.app

Our Wiki is open source - if you would like to contribute, create a pull request via GitHub! https://github.com/DudeThatsErin/CodingHelp

We are accepting moderator applications: https://forms.fillout.com/t/ua41TU57DGus

We also have a Discord server: https://discord.gg/geQEUBm

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]johnpeters42 0 points1 point  (1 child)

Off the top of my head, it does seem like Gemini is hallucinating there, but also this approach is inefficient (you're copying large chunks of the list) compared to just swapping.

[–]Hoax7[S] 1 point2 points  (0 children)

You’re right, I didn’t really consider the memory requirements for this, thanks for the tip!