It's ensuring that the tests pass with the specification of how it will be called, in as little time as possible (still only 94th percentile o_O). So more like shittyinterviewquestionsonprogramming.
"Fuck. The IDE is giving an error because my skeleton function isn't returning anything. There. That'll fix it. Mental note: finish implementation before summer internship ends."
All object variables are references in Java; yes everything is passed by value but with an object you're passing the value of the reference i.e. the String reference gets copied but not the string data
In short: Add methods that currently do nothing but also require no refractoring when you update the methods. It's a good approach if you know it'll change in the future.
99
u/marvin02 Feb 28 '19
All tests pass, A+
72
u/[deleted] Feb 28 '19
Cheers, Java.
15
u/[deleted] Feb 28 '19
Let's see if I got this right.
This is not actually doing anything?
5
u/inm808 Feb 28 '19
Is this leetcode
4
u/Swaxr Feb 28 '19
Should have named the function maybe_encode.
1
u/form_d_k Mar 26 '19
"Fuck. The IDE is giving an error because my skeleton function isn't returning anything. There. That'll fix it. Mental note: finish implementation before summer internship ends."
0
u/[deleted] Feb 28 '19
[deleted] — view deleted comment
0
u/[deleted] Feb 28 '19
[deleted] — view deleted comment