Skip to content

Instantly share code, notes, and snippets.

@cyyeh
Last active March 21, 2019 06:49
Show Gist options
  • Save cyyeh/c8a190308a88e5b00bbfc89faa0e5388 to your computer and use it in GitHub Desktop.
Save cyyeh/c8a190308a88e5b00bbfc89faa0e5388 to your computer and use it in GitHub Desktop.
Leet Code Discussion

Leet Code Sharing

Stack

Easy

  • 682. Baseball Game
    • 葉致煜
      • Runtime: 40 ms, faster than 52.00% of Python3 online submissions for Baseball Game
      • Memory Usage: 12.9 MB, less than 5.15% of Python3 online submissions for Baseball Game.
      • [Code](paste playground code link here)
  • 844. Backspace String Compare
    • 葉致煜
      • Runtime: 40 ms, faster than 51.11% of Python3 online submissions for Backspace String Compare.
      • Memory Usage: 13.1 MB, less than 5.19% of Python3 online submissions for Backspace String Compare.
  • 232. Implement Queue using Stacks
    • 葉致煜
      • Runtime: 36 ms, faster than 56.79% of Python3 online submissions for Implement Queue using Stacks.
      • Memory Usage: 13.3 MB, less than 5.32% of Python3 online submissions for Implement Queue using Stacks.
  • 225. Implement Stack using Queues
    • 葉致煜
      • Runtime: 36 ms, faster than 61.06% of Python3 online submissions for Implement Stack using Queues.
      • Memory Usage: 13 MB, less than 5.45% of Python3 online submissions for Implement Stack using Queues.
  • 20. Valid Parentheses
    • 葉致煜
      • Runtime: 40 ms, faster than 53.66% of Python3 online submissions for Valid Parentheses.
      • Memory Usage: 13.2 MB, less than 5.22% of Python3 online submissions for Valid Parentheses.

Queue

Easy

Linked List

Easy

  • 707. Design Linked List
    • 葉致煜
      • Runtime: 308 ms, faster than 19.32% of Python3 online submissions for Design Linked List.
      • Memory Usage: 13.7 MB, less than 5.09% of Python3 online submissions for Design Linked List.
  • 203. Remove Linked List Elements
    • 葉致煜
      • Runtime: 92 ms, faster than 30.69% of Python3 online submissions for Remove Linked List Elements.
      • Memory Usage: 16.2 MB, less than 18.58% of Python3 online submissions for Remove Linked List Elements.
  • 234. Palindrome Linked List
    • 葉致煜
      • Runtime: 80 ms, faster than 65.48% of Python3 online submissions for Palindrome Linked List.
      • Memory Usage: 23.5 MB, less than 13.81% of Python3 online submissions for Palindrome Linked List.
  • 141. Linked List Cycle
    • 葉致煜
      • Runtime: 2040 ms, faster than 5.04% of Python online submissions for Linked List Cycle.
      • Memory Usage: 18 MB, less than 5.04% of Python online submissions for Linked List Cycle.
  • 83. Remove Duplicates from Sorted List
    • 葉致煜
      • Runtime: 28 ms, faster than 100.00% of Python online submissions for Remove Duplicates from Sorted List.
      • Memory Usage: 10.9 MB, less than 53.49% of Python online submissions for Remove Duplicates from Sorted List.
  • 21. Merge Two Sorted Lists
    • 葉致煜
      • Runtime: 40 ms, faster than 16.06% of Python online submissions for Merge Two Sorted Lists.
      • Memory Usage: 10.8 MB, less than 51.63% of Python online submissions for Merge Two Sorted Lists.
  • 206. Reverse Linked List
    • 葉致煜
      • Runtime: 48 ms, faster than 34.75% of Python3 online submissions for Reverse Linked List.
      • Memory Usage: 15.3 MB, less than 28.35% of Python3 online submissions for Reverse Linked List.
  • 876. Middle of the Linked List
    • 葉致煜
      • Runtime: 36 ms, faster than 58.99% of Python3 online submissions for Middle of the Linked List.
      • Memory Usage: 13.1 MB, less than 5.04% of Python3 online submissions for Middle of the Linked List.

Array

Easy

  • 977. Squares of a Sorted Array
    • 葉致煜
      • Runtime: 176 ms, faster than 44.44% of Python3 online submissions for Squares of a Sorted Array.
      • Memory Usage: 15 MB, less than 5.22% of Python3 online submissions for Squares of a Sorted Array.
  • 905. Sort Array By Parity
    • 葉致煜
      • Runtime: 76 ms, faster than 54.16% of Python3 online submissions for Sort Array By Parity.
      • Memory Usage: 14 MB, less than 5.69% of Python3 online submissions for Sort Array By Parity.
  • 832. Flipping an Image
    • 葉致煜
      • Runtime: 52 ms, faster than 49.95% of Python3 online submissions for Flipping an Image.
      • Memory Usage: 13.2 MB, less than 5.63% of Python3 online submissions for Flipping an Image.
  • 665. Non-decreasing Array
    • 葉致煜
      • Runtime: 10240 ms, faster than 5.25% of Python3 online submissions for Non-decreasing Array.
      • Memory Usage: 14.3 MB, less than 5.95% of Python3 online submissions for Non-decreasing Array.
  • 414. Third Maximum Number
    • 葉致煜
      • Runtime: 44 ms, faster than 41.58% of Python3 online submissions for Third Maximum Number.
      • Memory Usage: 13.7 MB, less than 5.88% of Python3 online submissions for Third Maximum Number.

String

Easy

  • 859. Buddy Strings
    • 葉致煜
      • Runtime: 64 ms, faster than 11.69% of Python3 online submissions for Buddy Strings.
      • Memory Usage: 13.4 MB, less than 5.88% of Python3 online submissions for Buddy Strings.
  • 125. Valid Palindrome
    • 葉致煜
      • Runtime: 76 ms, faster than 36.95% of Python3 online submissions for Valid Palindrome.
      • Memory Usage: 12.9 MB, less than 50.83% of Python3 online submissions for Valid Palindrome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment