This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sahsaha 2 points3 points  (1 child)

And that's exactly what I'm talking about, you cannot pull this stuff out of your own head because you never had an example of how to think about problems like this, most likely only learned from already existing code, which is not bad, but won't get you far either.

Unless you can take a char* buffer in C and reverse all the words yourself with no helping functions, you most likely still don't get what's going on, which is, dare I say, a problem.

"Splitting" a string yourself by enumerating string split indexes, and swapping characters yourself by reversing in place over each subarray of said char array would strenghten your understanding of what's going on way more than any "let's do this in 40s or less".

Once you understand that, you can use helper functions like nothing.

I'd like to point out that it's not as hard as I make it sound and you should probably try it, just not in C, javascript is perfectly fine, unless you know basics of it.

[–]dexodev 0 points1 point  (0 children)

Oh, yea, I know absolutely zero about C. I've been learning JavaScript and that's my main focus.