ContriHUB / E-CP

A CLI tool with a variety of features to help in practicing competitive programming problems
0 stars 14 forks source link

Add leetcode scraper #4

Open akstron opened 1 year ago

akstron commented 1 year ago

Add a web scraper to extract leetcode problem sample input/output.

utkarsh1236 commented 1 year ago

Hi @akstron ! I had a query regarding this issue. LeetCode has a different format of displaying sample test cases and of accepting solutions since it requires you to submit your solution in a class. Then what would be the right way to store the sample input and output as we don't really know how the input is being passed into the solution?

utkarsh1236 commented 1 year ago

For example, in this problem the first example states that nums = [23,2,4,6,7], k = 6 but I don't believe we can just store them as it is in the input file.

akstron commented 1 year ago

That's true. We can think about parsing the content before storing it in the test file. For now, we can create an array parser, and a 2d array parser.