Link to the code: https://pastebin.com/CWJfXfYD
Link to the question: https://leetcode.com/problems/interva...
*Complexity Analysis*
Time Complexity: O(M+N), where M,N are the lengths of A and B respectively.
Space Complexity: O(M+N), the maximum size of the answer.
SUPPORT MY WORK BY SUBSCRIBING TO THE CHANNEL :
/ @akshaygoyal2134
LeetCode Playlist: • Prison Cells After N Days | prison cells a... .