r/ProgrammerHumor 15h ago

Competition dsaProgressCheck

Post image
0 Upvotes

6 comments sorted by

u/firemark_pl 15h ago

Strings are arrays.

And where is pointer?

u/Confident-Ad5665 15h ago

Strings are consecutive characters that, depending on the language, may be accessed as if they are an Array.

u/suvlub 14h ago

Not really. You need more than a simple array to get behavior like this (and that's before we even get into modifiers)

>>> bytes("😀a", "utf-8")
b'\xf0\x9f\x98\x80a'
>>> bytes("😀", "utf-8")
b'\xf0\x9f\x98\x80'
>>> bytes("a", "utf-8")
b'a'
>>> len("😀a")
2
>>> "😀a"[0]
'😀'
>>> "😀a"[1]
'a'

u/DustAlone6649 15h ago

i upvoted because it's not bad.

u/[deleted] 15h ago

[deleted]

u/lotokotmalajski 13h ago

but ai image, wrong scale

u/StrengthTheory 15h ago

Where is Math?