Collection of leetcode prob solutions using TypeScript.
Check the /src
, you could see the different pattern/topic, then click it, some includes the note, read it before you try to solve the prob.
Type "T", in this repo page, and then type the problem title like "best-time-to-buy-and-sell-stock".
And you'll see that file best-time-to-buy-and-sell-stock.ts
is under the src/kadanes-algorithm
it's the related topic of this prob, then enter and see the solution, some solution I've added the thinking process as comment.
$ npm i # install dependency, typescript, ts-node
$ npx ts-node src/rotate-array.ts
Don't forget to add the test case if you really want to run it!
Most use-case of this repo might be just a reference.