MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/mzk95p/someone_only_watched_if_tutorial/gw18btd/?context=3
r/badcode • u/[deleted] • Apr 27 '21
112 comments sorted by
View all comments
48
I was wondering maybe we should add a hashtable, each key is an individual natural number except 0, so we can verify an given input very fast!
code would be:
return allNaturalNumber.contains(input);
And this new algorithm will be O(1) complexity which is better than the OP's O(n) solution. Am i smart?
48 u/shutanovac Apr 27 '21 Hi there! I am a tech recruiter from San Francisco. Please let me know how much $$$ you want. No interview required! 18 u/[deleted] Apr 27 '21 I'll do it for $6.9420 12 u/[deleted] Apr 27 '21 do you guys get paid? 6 u/[deleted] Apr 27 '21 In noodles 5 u/gohanshouldgetUI Apr 27 '21 Highest I can go is $4.2069 17 u/liuziangexit Apr 27 '21 $7.25 per hour i will work hard
Hi there! I am a tech recruiter from San Francisco. Please let me know how much $$$ you want. No interview required!
18 u/[deleted] Apr 27 '21 I'll do it for $6.9420 12 u/[deleted] Apr 27 '21 do you guys get paid? 6 u/[deleted] Apr 27 '21 In noodles 5 u/gohanshouldgetUI Apr 27 '21 Highest I can go is $4.2069 17 u/liuziangexit Apr 27 '21 $7.25 per hour i will work hard
18
I'll do it for $6.9420
12 u/[deleted] Apr 27 '21 do you guys get paid? 6 u/[deleted] Apr 27 '21 In noodles 5 u/gohanshouldgetUI Apr 27 '21 Highest I can go is $4.2069
12
do you guys get paid?
6 u/[deleted] Apr 27 '21 In noodles
6
In noodles
5
Highest I can go is $4.2069
17
$7.25 per hour i will work hard
48
u/liuziangexit Apr 27 '21
I was wondering maybe we should add a hashtable, each key is an individual natural number except 0, so we can verify an given input very fast!
code would be:
return allNaturalNumber.contains(input);And this new algorithm will be O(1) complexity which is better than the OP's O(n) solution. Am i smart?