hard20 pts · first answer countsgraphsgrid-graphsperformance
Visited set for a 5000 × 5000 grid
A BFS on a 5000 × 5000 grid stores visited cells in a JavaScript Set of strings like "r,c" and runs out of memory. What is the best fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Slow email during signupBackend Developer
- What EXPLAIN tells youBackend Developer
- Asking for only a few fieldsBackend Developer
- Building a long string in a loopBackend Developer
- Checking if any rows existBackend Developer
- Edges in a tree with n nodesBackend Developer
- Most nodes in a binary tree of height 3Backend Developer
- What inorder traversal of a BST givesBackend Developer