Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
itsmeknt
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
itsmeknt
2y ago
Thanks! I have updated my post to use your code. It is indeed much nicer. And yes, I don't write much FP. I just improved the comprehension code as well using the same idea as your code, eliminating an entire list!
2.
▲
by
itsmeknt
2y ago
True! Good point on the restructuring, I haven't thought about it in that way. I think I like the second approach because the loop behavior seems clearest, which helps me analyze the time complexity or when I want to skim the code quic
3.
▲
by
itsmeknt
2y ago
I tried scaling up the original into an intentionally convoluted nonsensical problem to see how a more complicated solution would look like for each approach. Do these look right? And which seems the most readable? # Functional approach
4.
▲
by
itsmeknt
2y ago
When a new island is formed, usually it is first inhabited by algae and moss. As the ecosystem matures, plants, birds, insects, and all sorts of organisms populate it. You can still usually find the early algae and moss. They are just harde