Skip to content

sal2701/leechcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

leechcode

Python script to fetch details about leetcode questions useful for planning interview preparation.

I have created a Google Sheet using this data, this might be useful for last moment preparation as well as revision. Hope you find it useful.

🔗 The Google Sheet

How to use this sheet?

  • First of all Make a copy of the sheet from the File option.
  • I have sorted the values according to the Wilson Score [Source] which is a better metric to rate something compared to a simple ratio.
  • All the best for your interviews!

The script

If you want to try this out on your own, keep reading.

How to use the script?

We basically need to send requests to the server as an authenticated user so we have to find those details.

  • Login to leetcode and go to any problem.
  • Open the Network panel ( Ctrl + Shift + E ) and reload.
  • Search for a graphql request in the big list, a small window will open to the right.
  • Click the Headers and scroll to find the Request Headers.
  • Copy below 2 values from here and paste them in the code
    • Cookie
    • x-csrftoken
  • Run the code python3 leech.py.

How to edit/clean the data?

Use the Pandas library to modify the data as it is very convenient.

About

Python script to fetch details about leetcode questions for planning interview preparation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages