FrontEndCollection
FrontEndCollection copied to clipboard
Notes for Fullstack Software Engineers. Covers common data structure and algorithms, web concepts, Javascript / TypeScript, React, and more!
- src is used to replace current element, href is used to build connection between two files. ```javascript ``` **When the browser parses this line of code, it will pause...
- Inline elements are: span, input, select, strong .... - Block elements are: div, ul, ol, li, dl, dt, dd, h1, h2, p.... - Void elements: br, hr, i, input,...
**Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it...
**Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its...
**You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.** **Return the fewest number of coins that you...
**Given the head of a singly linked list, reverse the list, and return the reversed list.**  *With the help with ES6, I found this problem can be easy to...
 [Code](https://github.com/cheatsheet1999/FrontEndCollection/tree/main/JS-Day/ModalBox)
**Given the root of a binary tree, return the inorder traversal of its nodes' values.** **Recursive Solution** ```Javascript var inorderTraversal = function(root, res = []) { if(!root) return []; if(root.left)...
**Given the root of a binary tree, return the preorder traversal of its nodes' values.** **A Very Straightforward Solution** ```Javascript var preorderTraversal = function(root, res = []) { if (!root)...
**Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k]...