- Migrations (if applicable)
- Seeders (if applicable)
- Automated Tests
- Integration
- E2E
- Authentication
- Authorization
- Documentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vehicle{ | |
factory Vehicle(int numberOfTyres) { | |
// An if-else statement can be used too | |
switch (numberOfTyres) { | |
case 2: | |
return Motorcycle(); | |
case 3: | |
return Tricycle(); | |
case 4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Implement the setInterval function in such a way that calling SetInterval.prototype.start | |
will start the function passed to it and run the function at intervals `interval` until | |
the SetInterval.prototype.clear method is called. | |
For example: | |
const theIntervalRunner = SetInterval(()=> console.log("logging'), 1000) | |
theIntervalRunner.start() | |
setTimeout(() => theIntervalRunner.clear(), 5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extractPropsToArray(obj, arr = [], path = "") { | |
for (const key in obj) { | |
if (Object.hasOwnProperty.call(obj, key)) { | |
const element = obj[key]; | |
const isObject = typeof element === "object"; | |
if (isObject) { | |
const pathname = Boolean(path) ? `${path}.${key}` : `${key}` | |
extractPropsToArray(element, arr,pathname ) | |
} else { | |
const pathname = Boolean(path) ? `${path}.${key}` : `${key}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
r io.Reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const qs = "?foo=bar&zee=zoo&baz&foo=bar2&foo"; | |
function getQueryObject(qs) { | |
const withoutQueryDelimiter = qs.slice(1); | |
const kvPairs = withoutQueryDelimiter.split("&"); | |
const output = {}; | |
for (const pair of kvPairs) { | |
const [key, val] = pair.split("="); | |
if (!key) continue; |
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.