/leetcode

Repository to store Leetcode problems I solved so far

Primary LanguagePython

leetcode

Repository to store LeetCode problems I solved so far.

Instructions

In order to create a new problem from a template, run create_problem.py passing the name of problem as argument. E.g.:

$ ./create_problem.py best-time-to-buy-and-sell-stock

Problem name: best-time-to-buy-and-sell-stock
dir best-time-to-buy-and-sell-stock does not exist
creating dir best-time-to-buy-and-sell-stock
creating best_time_to_buy_and_sell_stock.py and best_time_to_buy_and_sell_stock.txt files from template

To run the code, go to new directory and run the python script passing the text file as input. E.g.:

$ cd best-time-to-buy-and-sell-stock/
$ python3 best_time_to_buy_and_sell_stock.py < best_time_to_buy_and_sell_stock.txt