NenadPantelic / cave-for-devs

Collection of the useful resources, tutorials and exercises for cs students and fresh graduates, but also for all the professionals who want to work on some challenges and find some stuff for maintaining brain and fingers active.
MIT License
0 stars 1 forks source link

CE-LC#1: Two sum problem #1

Open NenadPantelic opened 3 years ago

NenadPantelic commented 3 years ago

Add solution for the LeetCode problem #1: Two Sum. Link: https://leetcode.com/problems/two-sum/ Languages to pick:

Note: put the file in the appropriate folder (based on the language). It is totally good to add another version of the solution with the different approach. In that case, use the same file (just add version no), e.g.

class Solution:
    # v1
    def twoSum(self, nums: List[int], target: int) -> List[int]:

    # v2
    def twoSum(self, nums: List[int], target: int) -> List[int]:

Different solutions should be conceptually different, e.g iterative and recursive, different algorithm or different idea in order to satisfy code review. Tests can be added in the file itself.

SaiRudh commented 3 years ago

Hello, I can help with this but I can script in all 12 languages I can submit solutions in

NenadPantelic commented 3 years ago

Hi @SaiRudh, yes of course. Just please, do the following:


Thanks for the contribution. Happy coding :blush: