Link to the code: https://pastebin.com/4T7gyLUD
Link to the question: https://leetcode.com/problems/majorit...
*Complexity Analysis
Time Complexity: O(n) where n is the size of the array.
Space Complexity: O(1).
SUPPORT MY WORK BY SUBSCRIBING TO THE CHANNEL :
/ @akshaygoyal2134
LeetCode Playlist: • Prison Cells After N Days | prison cells a...