Shortest Path Visiting All Nodes

Given an undirected connected graph as an adjacency matrix, find the length of the shortest path that visits every node at least once. You may start and end at any node.

Examples
Input: [[1,2,3],[0],[0],[0]]
Output: 4
Hints

Shortest Path Visiting All Nodes

Given an undirected connected graph as an adjacency matrix, find the length of the shortest path that visits every node at least once. You may start and end at any node.