> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0697_degree_of_an_array/slt.md).

# Solution1 Hash

Use a hash table `counter` to count original nums' frequency, and find degree.

Then find the max degree's correspoding number, then find's left-most and right-most index.

To do that, use two dict `left` and `right` to store every number left and right-most index.
