Initial push to add merge-k-sorted-lists.py and teemo-attacking.py in…
… addition to my name in README
Pull Request Template
Description
There are two problems I attempted to solve in this change. For the problem "teemo-attacking," the problem needed to be solved was to figure out how long a debuff would be applied, given the duration of the debuff and the times when the debuff would be applied. I solved it using Python and cycled through the array to add to the total time the debuff lasted. If the time the debuff would last was longer than when it would next be applied, I subtracted the overlapping amount of time. For the problem "merge-k-sorted-lists," it asked to merge k amounts of linked lists into one linked ist in ascending order. In order to do this, I created a function that would merge two lists and would then recursively do that for all of the linked lists until they were merged in the one linked list. To merge two linked lists I would check their lengths and see if something could be added and then added whichever one had the lower value.
Put check marks:
Have you made changes in README file ?
- [ *] Added problem & solution under correct topic.
- [ *] Specified Space & Time complexity.
- [ *] Specified difficulty level, tag & Note(if any).
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
- [ *] Using the tests provided by the question
- [ *] Testing other edge cases that I could think of
Make sure all below guidelines are followed else PR will get Reject:
- [* ] My code follows the style guidelines of this project
- [* ] I have performed a self-review of my own code
- [* ] I have commented my code so that it is easy to understand
- [* ] I have made corresponding changes to the documentation
- [* ] My changes generate no new warnings
- [* ] Any dependent changes have been merged and published in downstream modules