Skip to content

Chrome extension to copy LeetCode problem data for quick and easy pasting into your IDE.

License

Notifications You must be signed in to change notification settings

zhao-stanley/leetcode-problem-grabber

Repository files navigation

Logo

LeetCode Problem Grabber

Fun little Chrome extension I threw together quickly to copy problem data to your clipboard for easy pasting into your IDE.

Steps to Use

  • Navigate to a problem page
    • Ex: https://leetcode.com/problems/reverse-linked-list/
  • Copy Problem Name - copies the problem name in the format [Number][Problem Name].py to be used as a filename
    • Ex: 206ReverseLinkedList.py
  • Copy Problem Skeleton - copies the problem statement, examples, constraints, and code skeleton to be pasted into the body of your solution file

Ex:

  """
  Given the head of a singly linked list, reverse the list, and return the reversed list.
   
  Example 1:
  Input: head = [1,2,3,4,5]
  Output: [5,4,3,2,1]

  Example 2:
  Input: head = [1,2]
  Output: [2,1]

  Example 3:
  Input: head = []
  Output: []

   
  Constraints:
  The number of nodes in the list is the range [0, 5000].
  -5000 <= Node.val <= 5000
   
  Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both?
  """

  # Definition for singly-linked list.
  # class ListNode:
  #     def __init__(self, val=0, next=None):
  #         self.val = val
  #         self.next = next
  class Solution:
      def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:

Manual Installation for Chrome 1

  • Download the latest .zip archive
  • Extract the .zip archive
  • Navigate to the extensions page of your Chromium browser of choice
  • Toggle on Developer Mode, which is typically found in the top right of the extensions page.
  • Click Load unpacked
  • Open the .zip archive and select the folder named leetcode-problem-grabber-main

Footnotes

  1. You will need to redo this process every time there is an update

About

Chrome extension to copy LeetCode problem data for quick and easy pasting into your IDE.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published