Skip to content

Instantly share code, notes, and snippets.

@gaurishg
gaurishg / grokking_to_leetcode.md
Last active February 23, 2022 02:05 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@gaurishg
gaurishg / hw02.py
Created October 22, 2020 11:17
Code for Homework 02 of DAA
class Node:
def __init__(self, data: int):
self.data: int = data
self.prev: Node = None
self.next: Node = None
def __repr__(self):
return f'Node({self.data})'
def __str__(self):
@gaurishg
gaurishg / NANDcounter.py
Last active August 29, 2020 16:04
Python3 script for counting number of NAND gates used in implementation of various logic gates and circuites in nand2tetris course.
#!/usr/bin/python3
import sys, os
import typing
args = sys.argv
# print(args)
# This dict will contain data of gate
GateDict = {"Nand": [1, {"Nand": 1}],
"DFF": [4, {"Nand": 4}],