💢☠💫Easiest👾Faster✅💯 Lesser🧠 🎯 C++✅Python3🐍✅Java✅C✅Python🐍✅C#✅💥🔥💫Explained☠💥🔥 Beats 100
\n\n# Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n\n Describe your first thoughts on how to solve this problem. \n- J
![0ehh83fsnh811.jpg](https://assets.leetcode.com/users/images/9fc46acb-7ba4-42e1-864c-3b0e7e0e82b6_1730795144.4340796.jpeg)\n\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n\n<!-- Describe your first thoughts on how to solve this problem. -->\n- ***JavaScript Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469892799\n- ***C++ Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469820297\n- ***Python3 Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469859399\n- ***Java Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469848647\n- ***C Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469886584\n- ***Python Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469859072\n- ***C# Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469890861\n- ***Go Code -->*** https://leetcode.com/problems/number-of-provinces/submissions/1469900329\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n     O(N^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n     O(N)\n# Code\n![th.jpeg](https://assets.leetcode.com/users/images/d0aa164e-2cfe-4584-bbc2-07d3b3c91b03_1733293792.070408.jpeg)\n
['Depth-First Search', 'C', 'Python', 'C++', 'Java', 'Go', 'Python3', 'JavaScript', 'C#']