Subsets | Leetcode 78 | Array | Recursion | Backtracking

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต
Time Complexity: O(N*2^N)
Space Complexity: O(N*2^N)

๐—™๐—ฒ๐—ฒ๐—น ๐—ณ๐—ฟ๐—ฒ๐—ฒ ๐˜๐—ผ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐˜ ๐—ถ๐—ณ ๐˜†๐—ผ๐˜‚ ๐—ต๐—ฎ๐˜ƒ๐—ฒ ๐—ฎ๐—ป๐˜† ๐—ฑ๐—ผ๐˜‚๐—ฏ๐˜๐˜€ ๐—ฎ๐—ฏ๐—ผ๐˜‚๐˜ ๐˜๐—ต๐—ฒ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ผ๐—ฟ ๐˜๐—ต๐—ฒ ๐—น๐—ผ๐—ด๐—ถ๐—ฐ!!

๐Ÿ”ดMy contact details

#Array
#Recursion
#Backtracking
#DataStructuresAndAlgorithms
#Leetcode
#ConsitencyChallenge
#NiteshNanda
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

Sorry, the total space complexity for this question is O(N*2^N) because we are generating all the subsets, it will be O(2^N) and for one subList it will take O(N).
The final space complexity with result output is O(N*2^N).

niteshnanda
visit shbcf.ru