sankalpdayal5 / LeetCode-Solutions

:octocat: (Daily Update) Java / Python Solutions of LeetCode Problems
https://www.youtube.com/c/sankalpdayal5
Apache License 2.0
11 stars 26 forks source link

Create 1347.py #69

Closed darshita-kumar closed 4 years ago

darshita-kumar commented 4 years ago

Leetcode accepted. Please review. Used a dictionary for reducing time complexity.

darshita-kumar commented 4 years ago

I have removed the commented question from the py file. As for optimizing time complexity I have tried but this one is the best I could do considering python language. Space complexity is less. Thanks! :)