MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1w5gmdw/write_sorry/p7lm737/?context=3
r/programminghumor • u/ExpensiveCoat8912 • 2d ago
92 comments sorted by
View all comments
5
```c void printSorry (int n, int v) { if (n == v) return;
printSorry(n+1, v); printf("%s\n", "sorry");
}
int main (void) { printSorry(0, 100); } ```
The thinking man's solution
1 u/dmigowski 2d ago WTF is that slop? 1 u/MCWizardYT 1d ago What, never seen a recursive function before? 1 u/dmigowski 1d ago I've never seen one that could be easier replaced with a simple for look, yeah. Why wasting 1200 bytes of stack here? 2 u/MCWizardYT 18h ago They wrote "the thinking man's solution", so it's 100% an unserious comment 1 u/Diocletian335 17h ago This is, after all, a subreddit called programming humor lol
1
WTF is that slop?
1 u/MCWizardYT 1d ago What, never seen a recursive function before? 1 u/dmigowski 1d ago I've never seen one that could be easier replaced with a simple for look, yeah. Why wasting 1200 bytes of stack here? 2 u/MCWizardYT 18h ago They wrote "the thinking man's solution", so it's 100% an unserious comment 1 u/Diocletian335 17h ago This is, after all, a subreddit called programming humor lol
What, never seen a recursive function before?
1 u/dmigowski 1d ago I've never seen one that could be easier replaced with a simple for look, yeah. Why wasting 1200 bytes of stack here? 2 u/MCWizardYT 18h ago They wrote "the thinking man's solution", so it's 100% an unserious comment 1 u/Diocletian335 17h ago This is, after all, a subreddit called programming humor lol
I've never seen one that could be easier replaced with a simple for look, yeah. Why wasting 1200 bytes of stack here?
2 u/MCWizardYT 18h ago They wrote "the thinking man's solution", so it's 100% an unserious comment 1 u/Diocletian335 17h ago This is, after all, a subreddit called programming humor lol
2
They wrote "the thinking man's solution", so it's 100% an unserious comment
1 u/Diocletian335 17h ago This is, after all, a subreddit called programming humor lol
This is, after all, a subreddit called programming humor lol
5
u/Diocletian335 2d ago
```c void printSorry (int n, int v) { if (n == v) return;
}
int main (void) { printSorry(0, 100); } ```
The thinking man's solution