String Reversal Code Golf

Users discuss and compete on the shortest code snippets for reversing strings or similar manipulations, often mocking LLMs for generating verbose solutions while sharing golfed versions and jokes.

📉 Falling 0.4x AI & Machine Learning
3,114
Comments
20
Years Active
5
Top Authors
#5274
Topic ID

Activity Over Time

2007
10
2008
41
2009
60
2010
109
2011
136
2012
116
2013
165
2014
147
2015
155
2016
197
2017
145
2018
153
2019
188
2020
203
2021
206
2022
253
2023
359
2024
231
2025
227
2026
13

Keywords

ISBN H4 LLM imgz.org string.js EcmaScript string characters count length character char mid slice manipulation strings

Sample Comments

reidjs • Mar 28, 2024 • View on HN

Is there something like leetcode for string manipulation exercises like this?

aarongray • Jul 6, 2015 • View on HN

That's an impressively long string.

BulgarianIdiot • Jun 5, 2023 • View on HN

Why waste time type lot char, when few char do trick

GoblinSlayer • Aug 4, 2021 • View on HN

EcmaScript all over again. As I understand, letter reversal doesn't count?

potatoman22 • Oct 12, 2023 • View on HN

LLMs aren't very good at string operations. They struggle with things like character counts, extracting substrings, and replacements.

Tepix • Apr 29, 2025 • View on HN

asking a LLM to do letter manipulation is cruel. Why not ask it to do something useful?

mywacaday • Aug 23, 2024 • View on HN

except they did it with 7 characters :)

hawski • Jan 21, 2020 • View on HN

It's more characters than manual way. There should be just a built-in function.

rufo • Jul 14, 2011 • View on HN

Just used cBfHcKrzAuacakTW - thanks!

irfan • Feb 6, 2013 • View on HN

Cool idea btw "love", "coffee" example doesn't work