maw.sh > Mahmoud Ashraf Website

Week #02 of Leetcode

Β· [[leetcode]]
  • This week I’ve built a shell script to generate a boilerplate for the problem from leetcode graphql api just run:

    ./bin/new :slug:

    and this will generate index.md with all metadata for the problem, index.ts which contains the function, and index.test.ts which contains a generic test case (TODO: will make it dynamic to get test cases from the api).

  • Also a new design for leetcode problem page with native html details tag for description

    a screenshot of word search leetcode problem from my website
    a screenshot of word search leetcode problem from my website
  • and a github workflow to generate the /leetcode page and commit the changes into the leetcode branch, and after that get finished will trigger another one to build my main website to get the latest changes

Techniques:

  • Prefix-Sum

    0974 - 0523

    So more prefix-sum problems, just to get comfort with the concept

  • Backtracking

    0017 - 0079 - 0078 - 0022

    I spend most of this week to get understand backtracking, it kinda challenging at the beginning, but after you get the pattern, you will crush any backpacking problem, and the main key for to get the constrains and base case by illustrate the problem and solution by hand in the paper first.

  • Lined-List

    0206

    I just solved one easy problem, and start to implement (WIP) the linkedlist data stricture using typescript

Webmentions

Comments

No Comments yet!