medium10 pts · first answer countsgraphsbfsstate-space
BFS on a combination lock
A 4-digit lock turns one wheel by one step per move, wrapping 9 ↔ 0. Some codes are forbidden. If you model this as a graph for BFS, how many states and neighbours per state are there?
Discussion 0
Join free to post in the discussion.
Related questions
- 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
- Preorder output of a small treeBackend Developer
- Traversal for freeing a whole treeBackend Developer
- Data structure for level-order traversalBackend Developer
- BST search time, typical and worstBackend Developer
- Leaves in a full binary treeBackend Developer