News for hackers. Stuff that matters.
Re:Ask HN: Anyone having issues with job applicant fraud? by sicp-enjoyer on Wednesday August 31, 2022 @08:13PM (#32670061)
> who wrote nested loops

What is this supposed to be the connotation here?

Re:Ask HN: Anyone having issues with job applicant fraud? by SauciestGNU on Wednesday August 31, 2022 @09:20PM (#32670605)
This suggests runtime complexity will be O(n^2), which is rarely an optimal solution to a problem.
Re:Ask HN: Anyone having issues with job applicant fraud? by jackblemming on Thursday September 01, 2022 @03:10AM (#32673037)
Unless they verify the source code of every library they use and verify the entire call stack; it probably has a nested for loop somewhere. Good thing computers are fast!
Re:Ask HN: Anyone having issues with job applicant fraud? by silvertaza on Thursday September 01, 2022 @03:39AM (#32673216)
Depending on n, oftentimes nested loops are more readable and maintainable than the optimal solution.

Of course too many levels of nesting is inherently a code smell that indicates other issues.

Re:Ask HN: Anyone having issues with job applicant fraud? by sicp-enjoyer on Thursday September 01, 2022 @10:15AM (#32676505)
Some common cases (that wouldn't be considered algorithms) are:

- working with grids (rows and columns)

- iterating over nested data structures (eg. all people in a group).

Re:Ask HN: Anyone having issues with job applicant fraud? by comex on Thursday September 01, 2022 @02:07AM (#32672597)
Perhaps, but “nested loops” by itself is an odd way to describe that.
Re:Ask HN: Anyone having issues with job applicant fraud? by strikelaserclaw on Thursday September 01, 2022 @08:11AM (#32675246)
that says nothing if you don't know the size of the input and the problem at hand. Sometimes the best you can do is N^2.
Re:Ask HN: Anyone having issues with job applicant fraud? by edgyquant on Thursday September 01, 2022 @03:22PM (#32681669)
That there’s almost always a more optimal solution than a triple nested loop in a useEffect. Any senior level engineer should be architecting said optimal solutions