Skip to content

alex-coch/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Python and C/C++ solutions for Leetcode

Update

Problems & Solutions

# Title Solution Basic idea (One line) Difficulty
1 Two Sum Python 1. Hash O(n) and O(n) space.
2. Sort and search with two points O(n) and O(1) space.
Easy
    """
    def isMatch(self, s:str, p:str)->bool:
    threshold function for classification
    :param u: input number
    :return: 1 if the input is greater than 0, otherwise -1
    >>> data = [[0],[-0.5],[0.5]]
    >>> targets = [1,-1,1]
    >>> perceptron = Perceptron(data,targets)
    >>> perceptron.sign(0)
    1
    >>> perceptron.sign(-0.5)
    -1
    >>> perceptron.sign(0.5)
    1
    """

About

LeetCode with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published