Skip to content

Instantly share code, notes, and snippets.

@slowpoison
slowpoison / gist:8e394270a79168ff2f00100ce51813d7
Created February 12, 2025 19:07
Deepseek R1 reversing a string
>>> Reverse this string: strawberry
<think>
Okay, so I need to reverse the word "strawberry." Hmm, let's see. First,
I'll write it down to visualize it better: s-t-r-a-w-e-r-b-e-r-r-y. Wait,
is that correct? Let me count the letters again. S (1), t(2), r(3), a(4),
w(5), e(6), r(7), b(8), e(9), r(10), r(11), y(12). So there are 12 letters
in total.
Now, reversing means starting from the end and going backwards. The last
letter is y, so that will be first. Then before that is r, but since I'm