├── public ├── robots.txt ├── favicon.ico ├── assets │ ├── icons │ │ ├── Adobe.png │ │ ├── Apple.png │ │ ├── Asana.png │ │ ├── Lyft.png │ │ ├── Quora.png │ │ ├── Tesla.png │ │ ├── Uber.png │ │ ├── Yelp.png │ │ ├── Airbnb.png │ │ ├── Amazon.png │ │ ├── Citadel.png │ │ ├── Facebook.png │ │ ├── Google.png │ │ ├── Intuit.png │ │ ├── JPMorgan.png │ │ ├── LinkedIn.png │ │ ├── Oracle.png │ │ ├── Palantir.png │ │ ├── Snapchat.png │ │ ├── Square.png │ │ ├── Twitch.png │ │ ├── Twitter.png │ │ ├── Atlassian.png │ │ ├── BlackRock.png │ │ ├── Bloomberg.png │ │ ├── Microsoft.png │ │ ├── Pinterest.png │ │ ├── Qualtrics.png │ │ ├── Salesforce.png │ │ ├── Two Sigma.png │ │ ├── Akuna Capital.png │ │ ├── Capital One.png │ │ ├── Goldman Sachs.png │ │ └── Morgan Stanley.png │ └── images │ │ ├── Blind.png │ │ ├── Educative.png │ │ └── Hackernoon.png ├── manifest.json └── index.html ├── .prettierrc.js ├── src ├── setupTests.js ├── components │ ├── Tabs │ │ ├── styles.scss │ │ └── index.js │ ├── PatternFrequencies │ │ ├── styles.scss │ │ └── index.js │ ├── Tips │ │ ├── styles.scss │ │ └── index.js │ ├── Acknowledgements │ │ ├── styles.scss │ │ └── index.js │ ├── styles.scss │ ├── Shared │ │ └── Tracking │ │ │ └── index.js │ ├── App.js │ ├── Navigation │ │ ├── styles.scss │ │ └── index.js │ └── Table │ │ ├── styles.scss │ │ ├── filters.js │ │ └── index.js ├── index.js └── data │ └── index.js ├── .gitignore ├── .eslintrc.js ├── package.json ├── README.md └── LICENSE.md /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 80, 3 | singleQuote: true, 4 | trailingComma: 'all', 5 | }; 6 | -------------------------------------------------------------------------------- /public/assets/icons/Adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Adobe.png -------------------------------------------------------------------------------- /public/assets/icons/Apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Apple.png -------------------------------------------------------------------------------- /public/assets/icons/Asana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Asana.png -------------------------------------------------------------------------------- /public/assets/icons/Lyft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Lyft.png -------------------------------------------------------------------------------- /public/assets/icons/Quora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Quora.png -------------------------------------------------------------------------------- /public/assets/icons/Tesla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Tesla.png -------------------------------------------------------------------------------- /public/assets/icons/Uber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Uber.png -------------------------------------------------------------------------------- /public/assets/icons/Yelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Yelp.png -------------------------------------------------------------------------------- /public/assets/icons/Airbnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Airbnb.png -------------------------------------------------------------------------------- /public/assets/icons/Amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Amazon.png -------------------------------------------------------------------------------- /public/assets/icons/Citadel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Citadel.png -------------------------------------------------------------------------------- /public/assets/icons/Facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Facebook.png -------------------------------------------------------------------------------- /public/assets/icons/Google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Google.png -------------------------------------------------------------------------------- /public/assets/icons/Intuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Intuit.png -------------------------------------------------------------------------------- /public/assets/icons/JPMorgan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/JPMorgan.png -------------------------------------------------------------------------------- /public/assets/icons/LinkedIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/LinkedIn.png -------------------------------------------------------------------------------- /public/assets/icons/Oracle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Oracle.png -------------------------------------------------------------------------------- /public/assets/icons/Palantir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Palantir.png -------------------------------------------------------------------------------- /public/assets/icons/Snapchat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Snapchat.png -------------------------------------------------------------------------------- /public/assets/icons/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Square.png -------------------------------------------------------------------------------- /public/assets/icons/Twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Twitch.png -------------------------------------------------------------------------------- /public/assets/icons/Twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Twitter.png -------------------------------------------------------------------------------- /public/assets/images/Blind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/images/Blind.png -------------------------------------------------------------------------------- /public/assets/icons/Atlassian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Atlassian.png -------------------------------------------------------------------------------- /public/assets/icons/BlackRock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/BlackRock.png -------------------------------------------------------------------------------- /public/assets/icons/Bloomberg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Bloomberg.png -------------------------------------------------------------------------------- /public/assets/icons/Microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Microsoft.png -------------------------------------------------------------------------------- /public/assets/icons/Pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Pinterest.png -------------------------------------------------------------------------------- /public/assets/icons/Qualtrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Qualtrics.png -------------------------------------------------------------------------------- /public/assets/icons/Salesforce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Salesforce.png -------------------------------------------------------------------------------- /public/assets/icons/Two Sigma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Two Sigma.png -------------------------------------------------------------------------------- /public/assets/images/Educative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/images/Educative.png -------------------------------------------------------------------------------- /public/assets/icons/Akuna Capital.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Akuna Capital.png -------------------------------------------------------------------------------- /public/assets/icons/Capital One.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Capital One.png -------------------------------------------------------------------------------- /public/assets/icons/Goldman Sachs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Goldman Sachs.png -------------------------------------------------------------------------------- /public/assets/images/Hackernoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/images/Hackernoon.png -------------------------------------------------------------------------------- /public/assets/icons/Morgan Stanley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amanchadha/leetcode-patterns/HEAD/public/assets/icons/Morgan Stanley.png -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | import { configure } from 'enzyme'; 2 | import Adapter from 'enzyme-adapter-react-16'; 3 | 4 | configure({ adapter: new Adapter() }); 5 | -------------------------------------------------------------------------------- /src/components/Tabs/styles.scss: -------------------------------------------------------------------------------- 1 | .tab-pane { 2 | .active { 3 | display: flex !important; 4 | justify-content: center; 5 | } 6 | } 7 | 8 | .nav-link:hover { 9 | cursor: pointer; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/PatternFrequencies/styles.scss: -------------------------------------------------------------------------------- 1 | .pattern-count { 2 | padding: 0.75em; 3 | 4 | h5 { 5 | font-weight: bold; 6 | } 7 | 8 | .badge { 9 | margin: 0.25em 0.25em; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Tips/styles.scss: -------------------------------------------------------------------------------- 1 | .tips { 2 | text-align: center !important; 3 | 4 | display: block; 5 | overflow-x: auto; 6 | padding: 0.5em; 7 | color: #333; 8 | background: #f8f8f8; 9 | } 10 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import 'bootstrap/dist/css/bootstrap.min.css'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | -------------------------------------------------------------------------------- /src/components/Acknowledgements/styles.scss: -------------------------------------------------------------------------------- 1 | .acknowledgements { 2 | justify-content: center; 3 | 4 | .row { 5 | justify-content: center; 6 | } 7 | 8 | h1 { 9 | text-align: center; 10 | } 11 | 12 | .nav-link { 13 | padding: 0; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/components/styles.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700'); 2 | 3 | .App { 4 | margin-left: calc(100vw - 100%); 5 | margin-right: 0; 6 | 7 | font-family: 'Open Sans', sans-serif; 8 | font-size: 14px; 9 | -webkit-font-smoothing: antialiased !important; 10 | } 11 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "leetcode-patterns", 3 | "name": "Leetcode Patterns", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /src/components/Shared/Tracking/index.js: -------------------------------------------------------------------------------- 1 | import ReactGA from 'react-ga'; 2 | 3 | const initGA = (trackingID, options) => { 4 | ReactGA.initialize(trackingID, { ...options }); 5 | }; 6 | 7 | const PageView = () => { 8 | ReactGA.pageview(window.location.pathname + window.location.search); 9 | }; 10 | 11 | const Event = (category, action, label) => { 12 | ReactGA.event({ 13 | category, 14 | action, 15 | label, 16 | }); 17 | }; 18 | 19 | export { initGA, PageView, Event }; 20 | -------------------------------------------------------------------------------- /src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import './styles.scss'; 4 | 5 | import Navigation from './Navigation'; 6 | import Tabs from './Tabs'; 7 | 8 | import { initGA, PageView } from './Shared/Tracking'; 9 | 10 | class App extends React.Component { 11 | componentDidMount() { 12 | initGA('UA-203108441-2', { debug: false }); 13 | PageView(); 14 | } 15 | 16 | render() { 17 | return ( 18 |
19 | 20 | 21 |
22 | ); 23 | } 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /src/components/Navigation/styles.scss: -------------------------------------------------------------------------------- 1 | .navbar-brand { 2 | font-weight: 600; 3 | letter-spacing: 1px; 4 | text-transform: uppercase; 5 | } 6 | 7 | .navbar-nav { 8 | .nav-item { 9 | letter-spacing: 1px; 10 | margin-left: 20px; 11 | text-align: center; 12 | text-transform: uppercase; 13 | cursor: pointer; 14 | } 15 | 16 | .nav-item:hover { 17 | color: #ffc952 !important; 18 | } 19 | 20 | a { 21 | color: #212529 !important; 22 | display: inline; 23 | font-size: 1rem; 24 | } 25 | 26 | a:hover { 27 | color: #ffc952 !important; 28 | } 29 | 30 | svg { 31 | font-size: 2em; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | Leetcode Patterns 14 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /src/components/Table/styles.scss: -------------------------------------------------------------------------------- 1 | .table { 2 | .row { 3 | justify-content: center; 4 | } 5 | 6 | thead { 7 | > tr:first-child { 8 | display: none; 9 | } 10 | 11 | > tr th { 12 | background: white; 13 | position: sticky; 14 | top: 0; 15 | } 16 | } 17 | 18 | .nav-link { 19 | padding: 0; 20 | } 21 | 22 | .easy { 23 | background-color: #5cb85c; 24 | } 25 | 26 | .medium { 27 | background-color: #f0ad4e; 28 | } 29 | 30 | .hard { 31 | background-color: #d9534f; 32 | } 33 | 34 | .companies, 35 | .patterns { 36 | justify-content: space-evenly; 37 | margin: 0; 38 | } 39 | 40 | .companies img { 41 | padding: 5px; 42 | } 43 | 44 | .react-toggle { 45 | top: 7px; 46 | } 47 | 48 | .reset-button { 49 | margin-top: 10px; 50 | font-size: 0.7rem; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'], 3 | env: { 4 | browser: true, 5 | commonjs: true, 6 | es6: true, 7 | jest: true, 8 | node: true, 9 | }, 10 | rules: { 11 | 'jsx-a11y/href-no-hash': ['off'], 12 | 'react/jsx-filename-extension': ['warn', { extensions: ['.js', '.jsx'] }], 13 | 'react/destructuring-assignment': [ 14 | 'warn', 15 | 'always', 16 | { 17 | ignoreClassFields: false, 18 | }, 19 | ], 20 | 'max-len': [ 21 | 'warn', 22 | { 23 | code: 80, 24 | tabWidth: 2, 25 | comments: 80, 26 | ignoreComments: false, 27 | ignoreTrailingComments: true, 28 | ignoreUrls: true, 29 | ignoreStrings: true, 30 | ignoreTemplateLiterals: true, 31 | ignoreRegExpLiterals: true, 32 | }, 33 | ], 34 | }, 35 | }; 36 | -------------------------------------------------------------------------------- /src/components/Tips/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactMarkdown from 'react-markdown'; 3 | 4 | import './styles.scss'; 5 | 6 | const Tips = () => { 7 | const input = ` 8 | \`\`\`md 9 | If input array is sorted then 10 | - Binary search 11 | - Two pointers 12 | 13 | If asked for all permutations/subsets then 14 | - Backtracking 15 | 16 | If given a tree then 17 | - DFS 18 | - BFS 19 | 20 | If given a graph then 21 | - DFS 22 | - BFS 23 | 24 | If given a linked list then 25 | - Two pointers 26 | 27 | If recursion is banned then 28 | - Stack 29 | 30 | If must solve in-place then 31 | - Swap corresponding values 32 | - Store one or more different values in the same pointer 33 | 34 | If asked for maximum/minimum subarray/subset/options then 35 | - Dynamic programming 36 | 37 | If asked for top/least K items then 38 | - Heap 39 | 40 | If asked for common strings then 41 | - Map 42 | - Trie 43 | 44 | Else 45 | - Map/Set for O(1) time & O(n) space 46 | - Sort input for O(nlogn) time and O(1) space 47 | \`\`\``; 48 | 49 | return ; 50 | }; 51 | 52 | export default Tips; 53 | -------------------------------------------------------------------------------- /src/components/Navigation/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Container, 4 | Nav, 5 | Navbar, 6 | NavbarBrand, 7 | NavLink, 8 | NavItem, 9 | } from 'reactstrap'; 10 | import { FaGithub } from 'react-icons/fa'; 11 | import { Event } from '../Shared/Tracking'; 12 | 13 | import './styles.scss'; 14 | 15 | const Navigation = () => { 16 | return ( 17 | 18 | 19 | 21 | Event('Navigation', 'Clicked link', 'Leetcode Patterns link') 22 | } 23 | > 24 | Leetcode Patterns 25 | 26 | 37 | 38 | 39 | ); 40 | }; 41 | 42 | export default Navigation; 43 | -------------------------------------------------------------------------------- /src/components/Table/filters.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function CreateDropDownListHelper(options, filterValue, setFilter, id) { 4 | return ( 5 | 19 | ); 20 | } 21 | 22 | export function DefaultColumnFilter({ 23 | // eslint-disable-next-line react/prop-types 24 | column: { filterValue, preFilteredRows, setFilter }, 25 | }) { 26 | // eslint-disable-next-line react/prop-types 27 | const count = preFilteredRows.length; 28 | 29 | return ( 30 | { 33 | setFilter(e.target.value || ''); 34 | }} 35 | placeholder={`Search ${count} questions`} 36 | /> 37 | ); 38 | } 39 | 40 | export function SelectDifficultyColumnFilter({ 41 | column: { filterValue, setFilter, id }, 42 | }) { 43 | const options = ['Easy', 'Medium', 'Hard']; 44 | 45 | return CreateDropDownListHelper(options, filterValue, setFilter, id); 46 | } 47 | 48 | export function SelectColumnFilter({ 49 | column: { filterValue, setFilter, preFilteredRows, id }, 50 | }) { 51 | const options = React.useMemo(() => { 52 | const set = new Set(); 53 | 54 | preFilteredRows.forEach(row => { 55 | const values = String(row.values[id]).split(','); 56 | 57 | values.forEach(value => { 58 | set.add(value); 59 | }); 60 | }); 61 | 62 | return [...set.values()].sort(); 63 | }, [id, preFilteredRows]); 64 | 65 | return CreateDropDownListHelper(options, filterValue, setFilter, id); 66 | } 67 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "homepage": "https://seanprashad.github.io/leetcode-patterns", 4 | "version": "0.1.0", 5 | "private": true, 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "bootstrap": "^4.5.3", 11 | "classnames": "^2.2.6", 12 | "enzyme": "^3.11.0", 13 | "enzyme-adapter-react-16": "^1.15.5", 14 | "gh-pages": "^2.2.0", 15 | "react": "^16.14.0", 16 | "react-dom": "^16.14.0", 17 | "react-ga": "^2.7.0", 18 | "react-icons": "^3.11.0", 19 | "react-markdown": "^4.3.1", 20 | "react-scripts": "4.0.0", 21 | "react-scroll": "^1.8.0", 22 | "react-table": "^7.6.3", 23 | "react-test-renderer": "^16.14.0", 24 | "react-toggle": "^4.1.1", 25 | "react-tooltip": "^3.11.2", 26 | "reactstrap": "^8.8.1", 27 | "sass": "1.49.0" 28 | }, 29 | "devDependencies": { 30 | "babel-eslint": "^10.0.3", 31 | "eslint": "^7.11.0", 32 | "eslint-config-airbnb": "^18.2.1", 33 | "eslint-config-prettier": "^6.15.0", 34 | "eslint-plugin-import": "^2.22.1", 35 | "eslint-plugin-jsx-a11y": "^6.4.1", 36 | "eslint-plugin-prettier": "^3.3.1", 37 | "eslint-plugin-react": "^7.22.0", 38 | "husky": "^3.1.0", 39 | "prettier": "^1.19.1", 40 | "pretty-quick": "^2.0.2" 41 | }, 42 | "scripts": { 43 | "predeploy": "npm run build", 44 | "deploy": "gh-pages -d build", 45 | "start": "react-scripts start", 46 | "build": "react-scripts build", 47 | "test": "react-scripts test", 48 | "eject": "react-scripts eject" 49 | }, 50 | "eslintConfig": { 51 | "extends": "react-app" 52 | }, 53 | "husky": { 54 | "hooks": { 55 | "pre-commit": "pretty-quick --staged" 56 | } 57 | }, 58 | "browserslist": { 59 | "production": [ 60 | ">0.2%", 61 | "not dead", 62 | "not op_mini all" 63 | ], 64 | "development": [ 65 | "last 1 chrome version", 66 | "last 1 firefox version", 67 | "last 1 safari version" 68 | ] 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/components/Tabs/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { 3 | TabContent, 4 | TabPane, 5 | Nav, 6 | NavItem, 7 | NavLink, 8 | Container, 9 | } from 'reactstrap'; 10 | import classnames from 'classnames'; 11 | import { Event } from '../Shared/Tracking'; 12 | 13 | import Table from '../Table'; 14 | import Tips from '../Tips'; 15 | import Acknowledgements from '../Acknowledgements'; 16 | 17 | import './styles.scss'; 18 | 19 | const Tabs = () => { 20 | const [activeTab, setActiveTab] = useState('1'); 21 | 22 | const toggle = tab => { 23 | if (activeTab !== tab) setActiveTab(tab); 24 | }; 25 | 26 | return ( 27 | 28 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | ); 76 | }; 77 | 78 | export default Tabs; 79 | -------------------------------------------------------------------------------- /src/components/PatternFrequencies/index.js: -------------------------------------------------------------------------------- 1 | import { Badge } from 'reactstrap'; 2 | import React from 'react'; 3 | // eslint-disable-next-line import/no-extraneous-dependencies 4 | import PropTypes from 'prop-types'; 5 | import './styles.scss'; 6 | 7 | const PatternFrequencies = ({ filters, rows }) => { 8 | const patternsMap = rows.reduce((acc, row) => { 9 | for (let i = 0; i < row.original.pattern.length; i += 1) { 10 | const pattern = row.original.pattern[i]; 11 | acc[pattern] = acc[pattern] + 1 || 1; 12 | } 13 | return acc; 14 | }, Object.create(null)); 15 | const sortedPatternsByFrequency = Object.keys(patternsMap).sort( 16 | (a, b) => patternsMap[b] - patternsMap[a], 17 | ); 18 | const showComponent = filters.find(filter => 19 | ['companies', 'difficulty'].includes(filter.id), 20 | ); 21 | 22 | const getFrequencyClass = rate => { 23 | const highestFrequency = Math.round( 24 | patternsMap[sortedPatternsByFrequency[0]], 25 | ); 26 | 27 | if (highestFrequency / 3 < 1) { 28 | return ''; 29 | } 30 | 31 | const frequencyRate = { 32 | easy: Math.round(highestFrequency / 3), 33 | medium: Math.round((highestFrequency / 3) * 2), 34 | hard: highestFrequency, 35 | }; 36 | 37 | return Object.keys(frequencyRate).find(key => rate <= frequencyRate[key]); 38 | }; 39 | 40 | return showComponent ? ( 41 |
42 |
Problems pattern frequency
43 | {sortedPatternsByFrequency.map((pattern, index) => ( 44 | 50 | 53 | {pattern} : {patternsMap[pattern]} 54 | 55 | 56 | ))} 57 |
58 | ) : null; 59 | }; 60 | 61 | PatternFrequencies.propTypes = { 62 | filters: PropTypes.arrayOf( 63 | PropTypes.shape({ id: PropTypes.string, value: PropTypes.string }), 64 | ).isRequired, 65 | rows: PropTypes.arrayOf( 66 | PropTypes.shape({ 67 | original: PropTypes.shape({ 68 | pattern: PropTypes.arrayOf(PropTypes.string), 69 | }), 70 | }), 71 | ).isRequired, 72 | }; 73 | 74 | export default PatternFrequencies; 75 | -------------------------------------------------------------------------------- /src/components/Acknowledgements/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Card, 4 | CardImg, 5 | CardBody, 6 | CardTitle, 7 | CardSubtitle, 8 | NavLink, 9 | Row, 10 | Col, 11 | Container, 12 | } from 'reactstrap'; 13 | import { Event } from '../Shared/Tracking'; 14 | 15 | import './styles.scss'; 16 | 17 | const imagePath = `${process.env.PUBLIC_URL}/assets/images/`; 18 | const Blind = `${imagePath}Blind.png`; 19 | const Educative = `${imagePath}Educative.png`; 20 | const Hackernoon = `${imagePath}Hackernoon.png`; 21 | 22 | const Acknowledgements = () => { 23 | return ( 24 | 25 | 26 |

27 | The following sources were used in aggregating this question list: 28 |

29 |
30 | 31 |
32 | 33 | 34 | 35 | Blind Curated 75 Question List 36 | 37 | { 41 | Event('Acknowledgements', 'Clicked URL', 'Blind 75 url'); 42 | }} 43 | > 44 | https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-100-LeetCode-Questions-to-Save-Your-Time-OaM1orEU 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Grokking the Coding Interview 55 | 56 | { 60 | Event( 61 | 'Acknowledgements', 62 | 'Clicked URL', 63 | 'Educative.io url', 64 | ); 65 | }} 66 | > 67 | https://www.educative.io/courses/grokking-the-coding-interview 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 14 Patterns to Ace Any Coding Interview Question 79 | 80 | 81 | { 85 | Event('Acknowledgements', 'Clicked URL', 'Hackernoon url'); 86 | }} 87 | > 88 | https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | ); 97 | }; 98 | 99 | export default Acknowledgements; 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Leetcode Patterns 2 | 3 | ## Table of Contents 4 | 5 | - [Background](#background) 6 | - [Preface](#preface) 7 | - [Notes](#notes) 8 | - [Question List](#question-list) 9 | - [Solutions](#solutions) 10 | - [Leetcode Discuss](#leetcode-discuss) 11 | - [Tips to Consider](#tips-to-consider) 12 | - [Suggestions](#suggestions) 13 | - [Acknowledgements](#acknowledgements) 14 | 15 | ## Background 16 | 17 | This repo is intended for any individual wanting to improve their problem 18 | solving skills for software engineering interviews. 19 | 20 | Problems are grouped under their respective subtopic, in order to focus on 21 | repeatedly applying common patterns rather than randomly tackling questions. 22 | 23 | All questions are available on [leetcode.com] with some requiring [leetcode premium]. 24 | 25 | ## Preface 26 | 27 | It is highly recommended to read chapters 1, 2, 3, 4, 8, and 10 of [Cracking The Coding Interview] 28 | to familiarize yourself with the following data structures and their operations: 29 | 30 | - Arrays 31 | - Maps 32 | - Linked Lists 33 | - Queues 34 | - Heaps 35 | - Stacks 36 | - Trees 37 | - Graphs 38 | 39 | In addition, you should have a good grasp on common algorithms such as: 40 | 41 | - Breadth-first search 42 | - Depth-first search 43 | - Binary search 44 | - Recursion 45 | 46 | ## Notes 47 | 48 | [This pdf] contains useful information for the built-in data structures in Java. 49 | 50 | Other useful methods to know include [`substring()`](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#substring-int-int-), [`toCharArray()`](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toCharArray--), [`Math.max()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#max-int-int-), 51 | [`Math.min()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#min-int-int-), and [`Arrays.fill()`](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#fill-int:A-int-). 52 | 53 | ## Question List 54 | 55 | The entire question list can be found here: 56 | https://seanprashad.com/leetcode-patterns/. 57 | 58 | In addition to viewing the question list, companies that have previously asked 59 | the question in the past 6 months (_as of May 2021_) will be listed. You can 60 | also use the checkboxes to mark which questions you've completed! 61 | 62 | ## Solutions 63 | 64 | Solutions written in Java can be found in the [solutions] branch. 65 | 66 | ## Leetcode Discuss 67 | 68 | [Leetcode discuss] is an amazing resource and features previous interview 69 | questions, as well as compensation and general career advice. 70 | 71 | ## Tips to Consider 72 | 73 | ``` 74 | If input array is sorted then 75 | - Binary search 76 | - Two pointers 77 | 78 | If asked for all permutations/subsets then 79 | - Backtracking 80 | 81 | If given a tree then 82 | - DFS 83 | - BFS 84 | 85 | If given a graph then 86 | - DFS 87 | - BFS 88 | 89 | If given a linked list then 90 | - Two pointers 91 | 92 | If recursion is banned then 93 | - Stack 94 | 95 | If must solve in-place then 96 | - Swap corresponding values 97 | - Store one or more different values in the same pointer 98 | 99 | If asked for maximum/minimum subarray/subset/options then 100 | - Dynamic programming 101 | 102 | If asked for top/least K items then 103 | - Heap 104 | 105 | If asked for common strings then 106 | - Map 107 | - Trie 108 | 109 | Else 110 | - Map/Set for O(1) time & O(n) space 111 | - Sort input for O(nlogn) time and O(1) space 112 | ``` 113 | 114 | ## Suggestions 115 | 116 | Think a question should/shouldn't be included? Wish there was another feature? 117 | Feel free to open an [issue] with your suggestion! 118 | 119 | ## Acknowledgements 120 | 121 | This list is heavily inspired from [Grokking the Coding Interview] with 122 | additional problems extracted from the [Blind 75 list] and this medium article 123 | on [14 patterns to ace any coding interview question]. 124 | 125 | [leetcode.com]: https://leetcode.com 126 | [leetcode premium]: https://leetcode.com/subscribe/ 127 | [this pdf]: https://drive.google.com/open?id=1ao4ZA28zzBttDkuS6MLQI52gDs_CJZEm 128 | [cracking the coding interview]: http://www.crackingthecodinginterview.com/contents.html 129 | [here]: https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed 130 | [topcoder]: https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/ 131 | [back to back swe youtube channel]: https://www.youtube.com/watch?v=jgiZlGzXMBw 132 | [solutions]: https://github.com/SeanPrashad/leetcode-patterns/tree/solutions 133 | [leetcode discuss]: https://leetcode.com/discuss/interview-question 134 | [grokking the coding interview]: https://www.educative.io/courses/grokking-the-coding-interview 135 | [issue]: https://github.com/SeanPrashad/leetcode-patterns/issues/new 136 | [blind 75 list]: https://www.teamblind.com/article/New-Year-Gift---Curated-List-of-Top-100-LeetCode-Questions-to-Save-Your-Time-OaM1orEU?utm_source=share&utm_medium=ios_app 137 | [14 patterns to ace any coding interview question]: https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed 138 | -------------------------------------------------------------------------------- /src/components/Table/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/jsx-props-no-spreading */ 2 | import React, { useState, useEffect } from 'react'; 3 | import { 4 | Table as ReactTable, 5 | Container, 6 | Row, 7 | Badge, 8 | NavLink, 9 | Button, 10 | Modal, 11 | ModalHeader, 12 | ModalFooter, 13 | } from 'reactstrap'; 14 | import Toggle from 'react-toggle'; 15 | import ReactTooltip from 'react-tooltip'; 16 | import { useTable, useFilters, useSortBy } from 'react-table'; 17 | import { FaLock, FaExternalLinkAlt, FaQuestionCircle } from 'react-icons/fa'; 18 | import { 19 | DefaultColumnFilter, 20 | SelectDifficultyColumnFilter, 21 | SelectColumnFilter, 22 | } from './filters'; 23 | import { Event } from '../Shared/Tracking'; 24 | 25 | import questions from '../../data'; 26 | 27 | import 'react-toggle/style.css'; 28 | import './styles.scss'; 29 | import PatternFrequencies from '../PatternFrequencies'; 30 | 31 | const iconPath = `${process.env.PUBLIC_URL}/assets/icons/`; 32 | 33 | const Table = () => { 34 | const data = React.useMemo(() => questions, []); 35 | const [resetCount, setResetCount] = useState(0); 36 | let checkedList = 37 | JSON.parse(localStorage.getItem('checked')) || 38 | new Array(data.length).fill(false); 39 | 40 | /* If the user has previously visited the website, then an array in 41 | LocalStorage would exist of a certain length which corresponds to which 42 | questions they have/have not completed. In the event that we add new questions 43 | to the list, then we would need to resize and copy the existing 'checked' 44 | array before updating it in LocalStorage in order to transfer their saved 45 | progress. */ 46 | if (checkedList.length !== data.length) { 47 | const resizedCheckedList = new Array(data.length).fill(false); 48 | 49 | for (let i = 0; i < checkedList.length; i += 1) { 50 | resizedCheckedList[i] = checkedList[i]; 51 | } 52 | 53 | checkedList = resizedCheckedList; 54 | window.localStorage.setItem('checked', JSON.stringify(checkedList)); 55 | } 56 | 57 | const difficultyMap = { Easy: 0, Medium: 0, Hard: 0 }; 58 | const totalDifficultyCount = { Easy: 0, Medium: 0, Hard: 0 }; 59 | for (let i = 0; i < data.length; i += 1) { 60 | difficultyMap[data[i].difficulty] += checkedList[data[i].id]; 61 | totalDifficultyCount[data[i].difficulty] += 1; 62 | } 63 | 64 | const [difficultyCount, setDifficultyCount] = useState(difficultyMap); 65 | const [checked, setChecked] = useState(checkedList); 66 | const [showPatterns, setShowPatterns] = useState( 67 | JSON.parse(localStorage.getItem('showPatterns')) || new Array(1).fill(true), 68 | ); 69 | 70 | useEffect(() => { 71 | window.localStorage.setItem('checked', JSON.stringify(checked)); 72 | }, [checked]); 73 | 74 | useEffect(() => { 75 | window.localStorage.setItem('showPatterns', JSON.stringify(showPatterns)); 76 | }, [showPatterns]); 77 | 78 | const defaultColumn = React.useMemo( 79 | () => ({ 80 | Filter: DefaultColumnFilter, 81 | minWidth: 30, 82 | maxWidth: 30, 83 | }), 84 | [], 85 | ); 86 | 87 | const resetHandler = () => { 88 | setChecked(new Array(checked.length).fill(false)); 89 | setDifficultyCount(() => { 90 | return { Easy: 0, Medium: 0, Hard: 0 }; 91 | }); 92 | const count = resetCount + 1; 93 | setResetCount(count); 94 | }; 95 | 96 | const columns = React.useMemo( 97 | () => [ 98 | { 99 | Header: 'Leetcode Patterns', 100 | columns: [ 101 | { 102 | Header: () => { 103 | const [resetModal, setResetModal] = React.useState(false); 104 | const toggleResetModal = () => { 105 | setResetModal(!resetModal); 106 | }; 107 | 108 | return ( 109 | 110 | 111 | 118 | Total:{' '} 119 | {difficultyCount.Easy + 120 | difficultyCount.Medium + 121 | difficultyCount.Hard} 122 | / 123 | {totalDifficultyCount.Easy + 124 | totalDifficultyCount.Medium + 125 | totalDifficultyCount.Hard} 126 | 127 | 128 |
129 | 130 | 133 | Easy: {difficultyCount.Easy}/{totalDifficultyCount.Easy} 134 | 135 | 136 |
137 | 138 | 141 | Medium: {difficultyCount.Medium}/ 142 | {totalDifficultyCount.Medium} 143 | 144 | 145 |
146 | 147 | 150 | Hard: {difficultyCount.Hard}/{totalDifficultyCount.Hard} 151 | 152 | 153 |
154 | 163 | 164 | 165 | Are you sure you want to reset your progress? 166 | 167 | 168 | 171 | 172 | 173 | 174 |
175 | ); 176 | }, 177 | id: 'Checkbox', 178 | Cell: cellInfo => { 179 | return ( 180 | 181 | { 185 | checked[cellInfo.row.original.id] = !checked[ 186 | cellInfo.row.original.id 187 | ]; 188 | 189 | const additive = checked[cellInfo.row.original.id] 190 | ? 1 191 | : -1; 192 | difficultyCount[ 193 | cellInfo.row.original.difficulty 194 | ] += additive; 195 | setDifficultyCount(difficultyCount); 196 | setChecked([...checked]); 197 | }} 198 | /> 199 | 200 | ); 201 | }, 202 | }, 203 | { 204 | Header: 'Questions', 205 | accessor: 'questions', 206 | disableSortBy: true, 207 | Cell: cellInfo => { 208 | return ( 209 | { 213 | Event( 214 | 'Table', 215 | 'Clicked question url', 216 | `${cellInfo.row.original.name} question url`, 217 | ); 218 | }} 219 | > 220 | {cellInfo.row.original.premium ? ( 221 | 222 | {' '} 223 | 224 | ) : ( 225 | '' 226 | )} 227 | {cellInfo.row.original.name} 228 | 229 | ); 230 | }, 231 | disableFilters: true, 232 | }, 233 | { 234 | Header: 'Solutions', 235 | accessor: 'solutions', 236 | disableSortBy: true, 237 | Cell: cellInfo => { 238 | const url = cellInfo.row.original.premium 239 | ? `${cellInfo.row.original.url}/` 240 | : cellInfo.row.original.url; 241 | return ( 242 | { 246 | Event( 247 | 'Table', 248 | 'Clicked solution', 249 | `${cellInfo.row.original.name} solution`, 250 | ); 251 | }} 252 | > 253 | 254 | 255 | ); 256 | }, 257 | disableFilters: true, 258 | }, 259 | { 260 | Header: () => { 261 | return ( 262 | // eslint-disable-next-line 263 | // eslint-disable-next-line jsx-a11y/label-has-associated-control 264 | 279 | ); 280 | }, 281 | accessor: 'pattern', 282 | disableSortBy: true, 283 | id: 'pattern', 284 | Cell: cellInfo => { 285 | const patterns = `${cellInfo.row.original.pattern}` 286 | .split(',') 287 | .map(pattern => { 288 | if (showPatterns[0] || checked[cellInfo.row.original.id]) { 289 | return ( 290 | 291 | {pattern} 292 | 293 | ); 294 | } 295 | 296 | return ( 297 | 298 | *** 299 | 300 | ); 301 | }); 302 | 303 | return {patterns}; 304 | }, 305 | 306 | Filter: SelectColumnFilter, 307 | }, 308 | { 309 | Header: 'Difficulty', 310 | accessor: 'difficulty', 311 | id: 'difficulty', 312 | disableSortBy: true, 313 | Cell: cellInfo => ( 314 | 315 | 319 | {cellInfo.row.original.difficulty} 320 | 321 | 322 | ), 323 | Filter: SelectDifficultyColumnFilter, 324 | }, 325 | { 326 | Header: () => { 327 | return ( 328 | <> 329 |
332 | Companies{' '} 333 | 334 | 335 | 336 |
337 | 338 | ); 339 | }, 340 | accessor: 'companies', 341 | sortType: (a, b) => { 342 | if (a.original.companies.length === b.original.companies.length) { 343 | return 0; 344 | } 345 | return a.original.companies.length > b.original.companies.length 346 | ? 1 347 | : -1; 348 | }, 349 | Cell: cellInfo => { 350 | const companies = cellInfo.row.original.companies.map(company => { 351 | return ( 352 | {company} 358 | ); 359 | }); 360 | 361 | return {companies}; 362 | }, 363 | Filter: SelectColumnFilter, 364 | }, 365 | ], 366 | }, 367 | ], 368 | // eslint-disable-next-line 369 | [resetCount], 370 | ); 371 | 372 | const { 373 | getTableProps, 374 | getTableBodyProps, 375 | headerGroups, 376 | filteredRows, 377 | state: { filters }, 378 | rows, 379 | prepareRow, 380 | } = useTable( 381 | { 382 | columns, 383 | data, 384 | defaultColumn, 385 | initialState: { 386 | filters: [ 387 | { 388 | id: 'difficulty', 389 | value: localStorage.getItem('difficulty') || '', 390 | }, 391 | { 392 | id: 'pattern', 393 | value: localStorage.getItem('pattern') || '', 394 | }, 395 | { 396 | id: 'companies', 397 | value: localStorage.getItem('companies') || '', 398 | }, 399 | ], 400 | }, 401 | }, 402 | useFilters, 403 | useSortBy, 404 | ); 405 | 406 | return ( 407 | 408 | 409 | 410 | 411 | 412 | {headerGroups.map(headerGroup => ( 413 | 414 | {headerGroup.headers.map(column => ( 415 | 427 | ))} 428 | 429 | ))} 430 | 431 | 432 | 433 | {rows.map(row => { 434 | prepareRow(row); 435 | return ( 436 | 437 | {row.cells.map(cell => { 438 | return ( 439 | 440 | ); 441 | })} 442 | 443 | ); 444 | })} 445 | 446 | 447 | 448 | ); 449 | }; 450 | 451 | export default Table; 452 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and`show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /src/data/index.js: -------------------------------------------------------------------------------- 1 | const questions = [ 2 | { 3 | id: 0, 4 | name: 'Contains Duplicate', 5 | url: 'https://leetcode.com/problems/contains-duplicate/', 6 | pattern: ['Arrays'], 7 | difficulty: 'Easy', 8 | premium: false, 9 | companies: [ 10 | 'Amazon', 11 | 'Adobe', 12 | 'Google', 13 | 'Bloomberg', 14 | 'Facebook', 15 | 'Apple', 16 | 'Microsoft', 17 | ], 18 | }, 19 | { 20 | id: 1, 21 | name: 'Missing Number', 22 | url: 'https://leetcode.com/problems/missing-number/', 23 | pattern: ['Arrays', 'Bit Manipulation'], 24 | difficulty: 'Easy', 25 | premium: false, 26 | companies: ['Microsoft', 'Facebook', 'Amazon', 'Google', 'Adobe'], 27 | }, 28 | { 29 | id: 2, 30 | name: 'Find All Numbers Disappeared in an Array', 31 | url: 32 | 'https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/', 33 | pattern: ['Arrays'], 34 | difficulty: 'Easy', 35 | premium: false, 36 | companies: ['Facebook', 'Amazon'], 37 | }, 38 | { 39 | id: 3, 40 | name: 'Single Number', 41 | url: 'https://leetcode.com/problems/single-number/', 42 | pattern: ['Arrays', 'Bit Manipulation'], 43 | difficulty: 'Easy', 44 | premium: false, 45 | companies: ['Amazon', 'Microsoft', 'Adobe'], 46 | }, 47 | { 48 | id: 4, 49 | name: 'Product of Array Except Self', 50 | url: 'https://leetcode.com/problems/product-of-array-except-self/', 51 | pattern: ['Arrays'], 52 | difficulty: 'Medium', 53 | premium: false, 54 | companies: [ 55 | 'Facebook', 56 | 'Amazon', 57 | 'Asana', 58 | 'Microsoft', 59 | 'Apple', 60 | 'Lyft', 61 | 'Adobe', 62 | 'Google', 63 | 'Uber', 64 | 'Goldman Sachs', 65 | 'Oracle', 66 | ], 67 | }, 68 | { 69 | id: 5, 70 | name: 'Find the Duplicate Number', 71 | url: 'https://leetcode.com/problems/find-the-duplicate-number/', 72 | pattern: ['Arrays', 'Binary Search', 'Two Pointers'], 73 | difficulty: 'Medium', 74 | premium: false, 75 | companies: [ 76 | 'Google', 77 | 'Microsoft', 78 | 'Amazon', 79 | 'Adobe', 80 | 'Bloomberg', 81 | 'Facebook', 82 | 'Apple', 83 | ], 84 | }, 85 | { 86 | id: 6, 87 | name: 'Find All Duplicates in an Array', 88 | url: 'https://leetcode.com/problems/find-all-duplicates-in-an-array/', 89 | pattern: ['Arrays'], 90 | difficulty: 'Medium', 91 | premium: false, 92 | companies: ['Amazon', 'Google'], 93 | }, 94 | { 95 | id: 7, 96 | name: 'Set Matrix Zeroes', 97 | url: 'https://leetcode.com/problems/set-matrix-zeroes/', 98 | pattern: ['Arrays'], 99 | difficulty: 'Medium', 100 | premium: false, 101 | companies: [ 102 | 'Facebook', 103 | 'Microsoft', 104 | 'Amazon', 105 | 'Apple', 106 | 'Adobe', 107 | 'Bloomberg', 108 | 'Oracle', 109 | ], 110 | }, 111 | { 112 | id: 8, 113 | name: 'Spiral Matrix', 114 | url: 'https://leetcode.com/problems/spiral-matrix/', 115 | pattern: ['Arrays'], 116 | difficulty: 'Medium', 117 | premium: false, 118 | companies: [ 119 | 'Microsoft', 120 | 'Amazon', 121 | 'Facebook', 122 | 'Apple', 123 | 'Google', 124 | 'Oracle', 125 | 'Bloomberg', 126 | 'Intuit', 127 | 'Adobe', 128 | ], 129 | }, 130 | { 131 | id: 9, 132 | name: 'Rotate Image', 133 | url: 'https://leetcode.com/problems/rotate-image/', 134 | pattern: ['Arrays'], 135 | difficulty: 'Medium', 136 | premium: false, 137 | companies: [ 138 | 'Amazon', 139 | 'Facebook', 140 | 'Microsoft', 141 | 'Apple', 142 | 'Bloomberg', 143 | 'Uber', 144 | 'Google', 145 | ], 146 | }, 147 | { 148 | id: 10, 149 | name: 'Word Search', 150 | url: 'https://leetcode.com/problems/word-search/', 151 | pattern: ['Backtracking'], 152 | difficulty: 'Medium', 153 | premium: false, 154 | companies: [ 155 | 'Amazon', 156 | 'Microsoft', 157 | 'Twitter', 158 | 'Facebook', 159 | 'Snapchat', 160 | 'Goldman Sachs', 161 | 'Google', 162 | 'Bloomberg', 163 | 'Apple', 164 | 'Adobe', 165 | 'Oracle', 166 | 'Qualtrics', 167 | ], 168 | }, 169 | 170 | { 171 | id: 11, 172 | name: 'First Missing Positive', 173 | url: 'https://leetcode.com/problems/first-missing-positive/', 174 | pattern: ['Arrays'], 175 | difficulty: 'Hard', 176 | premium: false, 177 | companies: ['Amazon', 'Microsoft', 'Facebook', 'Google', 'Adobe', 'Apple'], 178 | }, 179 | { 180 | id: 12, 181 | name: 'Longest Consecutive Sequence', 182 | url: 'https://leetcode.com/problems/longest-consecutive-sequence/', 183 | pattern: ['Arrays'], 184 | difficulty: 'Medium', 185 | premium: false, 186 | companies: [ 187 | 'Microsoft', 188 | 'Facebook', 189 | 'Amazon', 190 | 'Google', 191 | 'LinkedIn', 192 | 'Apple', 193 | 'Qualtrics', 194 | 'Goldman Sachs', 195 | 'Salesforce', 196 | ], 197 | }, 198 | 199 | { 200 | id: 13, 201 | name: 'Letter Case Permutation', 202 | url: 'https://leetcode.com/problems/letter-case-permutation/', 203 | pattern: ['Backtracking'], 204 | difficulty: 'Medium', 205 | premium: false, 206 | companies: ['Microsoft'], 207 | }, 208 | { 209 | id: 14, 210 | name: 'Subsets', 211 | url: 'https://leetcode.com/problems/subsets/', 212 | pattern: ['Backtracking'], 213 | difficulty: 'Medium', 214 | premium: false, 215 | companies: [ 216 | 'Facebook', 217 | 'Amazon', 218 | 'Google', 219 | 'Bloomberg', 220 | 'Goldman Sachs', 221 | 'Adobe', 222 | 'Twitter', 223 | ], 224 | }, 225 | { 226 | id: 15, 227 | name: 'Subsets II', 228 | url: 'https://leetcode.com/problems/subsets-ii/', 229 | pattern: ['Backtracking'], 230 | difficulty: 'Medium', 231 | premium: false, 232 | companies: ['Facebook', 'Amazon', 'Bloomberg'], 233 | }, 234 | { 235 | id: 16, 236 | name: 'Permutations', 237 | url: 'https://leetcode.com/problems/permutations/', 238 | pattern: ['Backtracking'], 239 | difficulty: 'Medium', 240 | premium: false, 241 | companies: [ 242 | 'Amazon', 243 | 'Facebook', 244 | 'LinkedIn', 245 | 'Bloomberg', 246 | 'Google', 247 | 'Microsoft', 248 | 'Adobe', 249 | 'Apple', 250 | 'Oracle', 251 | ], 252 | }, 253 | { 254 | id: 17, 255 | name: 'Permutations II', 256 | url: 'https://leetcode.com/problems/permutations-ii/', 257 | pattern: ['Backtracking'], 258 | difficulty: 'Medium', 259 | premium: false, 260 | companies: ['LinkedIn', 'Facebook', 'Amazon', 'Adobe', 'Apple'], 261 | }, 262 | { 263 | id: 18, 264 | name: 'Combinations', 265 | url: 'https://leetcode.com/problems/combinations/', 266 | pattern: ['Backtracking'], 267 | difficulty: 'Medium', 268 | premium: false, 269 | companies: ['Google', 'Facebook', 'Amazon'], 270 | }, 271 | { 272 | id: 19, 273 | name: 'Combination Sum', 274 | url: 'https://leetcode.com/problems/combination-sum/', 275 | pattern: ['Backtracking'], 276 | difficulty: 'Medium', 277 | premium: false, 278 | companies: [ 279 | 'Facebook', 280 | 'Amazon', 281 | 'Airbnb', 282 | 'Apple', 283 | 'Adobe', 284 | 'Microsoft', 285 | 'LinkedIn', 286 | 'Goldman Sachs', 287 | 'Snapchat', 288 | 'Salesforce', 289 | ], 290 | }, 291 | { 292 | id: 20, 293 | name: 'Combination Sum II', 294 | url: 'https://leetcode.com/problems/combination-sum-ii/', 295 | pattern: ['Backtracking'], 296 | difficulty: 'Medium', 297 | premium: false, 298 | companies: ['Facebook', 'Amazon'], 299 | }, 300 | { 301 | id: 21, 302 | name: 'Combination Sum III', 303 | url: 'https://leetcode.com/problems/combination-sum-iii/', 304 | pattern: ['Backtracking'], 305 | difficulty: 'Medium', 306 | premium: false, 307 | companies: ['Google'], 308 | }, 309 | { 310 | id: 22, 311 | name: 'Generate Parentheses', 312 | url: 'https://leetcode.com/problems/generate-parentheses/', 313 | pattern: ['Backtracking'], 314 | difficulty: 'Medium', 315 | premium: false, 316 | companies: [ 317 | 'Amazon', 318 | 'Facebook', 319 | 'Microsoft', 320 | 'Apple', 321 | 'Bloomberg', 322 | 'Adobe', 323 | 'Uber', 324 | 'Google', 325 | 'Goldman Sachs', 326 | ], 327 | }, 328 | { 329 | id: 23, 330 | name: 'Target Sum', 331 | url: 'https://leetcode.com/problems/target-sum/', 332 | pattern: ['DFS', 'Dynamic Programming'], 333 | difficulty: 'Medium', 334 | premium: false, 335 | companies: ['Facebook', 'Amazon', 'Microsoft', 'Adobe'], 336 | }, 337 | { 338 | id: 24, 339 | name: 'Palindrome Partitioning', 340 | url: 'https://leetcode.com/problems/palindrome-partitioning/', 341 | pattern: ['Backtracking'], 342 | difficulty: 'Medium', 343 | premium: false, 344 | companies: ['Apple'], 345 | }, 346 | { 347 | id: 25, 348 | name: 'Letter Combinations of a Phone Number', 349 | url: 'https://leetcode.com/problems/letter-combinations-of-a-phone-number/', 350 | pattern: ['Backtracking'], 351 | difficulty: 'Medium', 352 | premium: false, 353 | companies: [ 354 | 'Amazon', 355 | 'Microsoft', 356 | 'Facebook', 357 | 'Google', 358 | 'Uber', 359 | 'Apple', 360 | 'Adobe', 361 | 'Twitter', 362 | 'Bloomberg', 363 | 'Oracle', 364 | 'Goldman Sachs', 365 | 'Snapchat', 366 | 'Intuit', 367 | ], 368 | }, 369 | { 370 | id: 26, 371 | name: 'Generalized Abbreviation', 372 | url: 'https://leetcode.com/problems/generalized-abbreviation/', 373 | pattern: ['Backtracking'], 374 | difficulty: 'Medium', 375 | premium: true, 376 | companies: ['Google'], 377 | }, 378 | { 379 | id: 27, 380 | name: 'Sudoku Solver', 381 | url: 'https://leetcode.com/problems/sudoku-solver/', 382 | pattern: ['Backtracking'], 383 | difficulty: 'Hard', 384 | premium: false, 385 | companies: ['Google', 'Intuit', 'Amazon', 'Apple', 'Uber', 'Bloomberg'], 386 | }, 387 | { 388 | id: 28, 389 | name: 'N-Queens', 390 | url: 'https://leetcode.com/problems/n-queens/', 391 | pattern: ['Backtracking'], 392 | difficulty: 'Hard', 393 | premium: false, 394 | companies: [ 395 | 'Amazon', 396 | 'Microsoft', 397 | 'Apple', 398 | 'Facebook', 399 | 'Uber', 400 | 'Goldman Sachs', 401 | 'Adobe', 402 | ], 403 | }, 404 | { 405 | id: 29, 406 | name: 'Climbing Stairs', 407 | url: 'https://leetcode.com/problems/climbing-stairs/', 408 | pattern: ['Dynamic Programming'], 409 | difficulty: 'Easy', 410 | premium: false, 411 | companies: ['Amazon', 'Microsoft', 'Google', 'Bloomberg', 'Apple', 'Adobe'], 412 | }, 413 | { 414 | id: 30, 415 | name: 'House Robber', 416 | url: 'https://leetcode.com/problems/house-robber/', 417 | pattern: ['Dynamic Programming'], 418 | difficulty: 'Medium', 419 | premium: false, 420 | companies: [ 421 | 'Amazon', 422 | 'Microsoft', 423 | 'Google', 424 | 'Apple', 425 | 'Adobe', 426 | 'Qualtrics', 427 | 'Bloomberg', 428 | 'Facebook', 429 | 'Goldman Sachs', 430 | ], 431 | }, 432 | { 433 | id: 31, 434 | name: 'Best Time to Buy and Sell Stock', 435 | url: 'https://leetcode.com/problems/best-time-to-buy-and-sell-stock/', 436 | pattern: ['Greedy'], 437 | difficulty: 'Easy', 438 | premium: false, 439 | companies: [ 440 | 'Amazon', 441 | 'Facebook', 442 | 'Apple', 443 | 'Adobe', 444 | 'Microsoft', 445 | 'Bloomberg', 446 | 'Snapchat', 447 | 'Goldman Sachs', 448 | 'Uber', 449 | 'Oracle', 450 | 'Google', 451 | 'BlackRock', 452 | 'Citadel', 453 | 'JPMorgan', 454 | 'Salesforce', 455 | ], 456 | }, 457 | { 458 | id: 32, 459 | name: 'Maximum Subarray', 460 | url: 'https://leetcode.com/problems/maximum-subarray/', 461 | pattern: ['Dynamic Programming'], 462 | difficulty: 'Easy', 463 | premium: false, 464 | companies: [ 465 | 'LinkedIn', 466 | 'Amazon', 467 | 'Adobe', 468 | 'Apple', 469 | 'Microsoft', 470 | 'Google', 471 | 'Bloomberg', 472 | 'Facebook', 473 | 'Uber', 474 | 'Oracle', 475 | 'Goldman Sachs', 476 | 'JPMorgan', 477 | ], 478 | }, 479 | { 480 | id: 33, 481 | name: 'Range Sum Query - Immutable', 482 | url: 'https://leetcode.com/problems/range-sum-query-immutable/', 483 | pattern: ['Dynamic Programming'], 484 | difficulty: 'Easy', 485 | premium: false, 486 | companies: ['Facebook', 'Adobe'], 487 | }, 488 | { 489 | id: 34, 490 | name: 'House Robber II', 491 | url: 'https://leetcode.com/problems/house-robber-ii/', 492 | pattern: ['Dynamic Programming'], 493 | difficulty: 'Medium', 494 | premium: false, 495 | companies: ['Amazon', 'Google'], 496 | }, 497 | { 498 | id: 35, 499 | name: 'Coin Change', 500 | url: 'https://leetcode.com/problems/coin-change/', 501 | pattern: ['Dynamic Programming'], 502 | difficulty: 'Medium', 503 | premium: false, 504 | companies: ['Amazon', 'Microsoft', 'Google', 'Apple'], 505 | }, 506 | { 507 | id: 36, 508 | name: 'Maximum Product Subarray', 509 | url: 'https://leetcode.com/problems/maximum-product-subarray/', 510 | pattern: ['Dynamic Programming'], 511 | difficulty: 'Medium', 512 | premium: false, 513 | companies: [ 514 | 'LinkedIn', 515 | 'Amazon', 516 | 'Microsoft', 517 | 'Google', 518 | 'Apple', 519 | 'Facebook', 520 | 'Bloomberg', 521 | ], 522 | }, 523 | { 524 | id: 37, 525 | name: 'Longest Increasing Subsequence', 526 | url: 'https://leetcode.com/problems/longest-increasing-subsequence/', 527 | pattern: ['Dynamic Programming'], 528 | difficulty: 'Medium', 529 | premium: false, 530 | companies: [ 531 | 'Google', 532 | 'Amazon', 533 | 'Facebook', 534 | 'Microsoft', 535 | 'Apple', 536 | 'Bloomberg', 537 | ], 538 | }, 539 | { 540 | id: 38, 541 | name: 'Longest Palindromic Substring', 542 | url: 'https://leetcode.com/problems/longest-palindromic-substring/', 543 | pattern: ['Dynamic Programming'], 544 | difficulty: 'Medium', 545 | premium: false, 546 | companies: [ 547 | 'Amazon', 548 | 'Microsoft', 549 | 'Adobe', 550 | 'Apple', 551 | 'Facebook', 552 | 'Google', 553 | 'Oracle', 554 | 'Salesforce', 555 | 'Bloomberg', 556 | 'LinkedIn', 557 | 'Tesla', 558 | ], 559 | }, 560 | { 561 | id: 39, 562 | name: 'Word Break', 563 | url: 'https://leetcode.com/problems/word-break/', 564 | pattern: ['Dynamic Programming'], 565 | difficulty: 'Medium', 566 | premium: false, 567 | companies: [ 568 | 'Facebook', 569 | 'Amazon', 570 | 'Microsoft', 571 | 'Uber', 572 | 'Apple', 573 | 'Bloomberg', 574 | 'Qualtrics', 575 | 'Adobe', 576 | 'Google', 577 | 'Snapchat', 578 | 'Salesforce', 579 | ], 580 | }, 581 | { 582 | id: 40, 583 | name: 'Combination Sum IV', 584 | url: 'https://leetcode.com/problems/combination-sum-iv/', 585 | pattern: ['Dynamic Programming'], 586 | difficulty: 'Medium', 587 | premium: false, 588 | companies: ['Google', 'Amazon', 'Facebook'], 589 | }, 590 | { 591 | id: 41, 592 | name: 'Decode Ways', 593 | url: 'https://leetcode.com/problems/decode-ways/', 594 | pattern: ['Dynamic Programming'], 595 | difficulty: 'Medium', 596 | premium: false, 597 | companies: [ 598 | 'Amazon', 599 | 'Google', 600 | 'Snapchat', 601 | 'Lyft', 602 | 'Goldman Sachs', 603 | 'Microsoft', 604 | 'Bloomberg', 605 | 'JPMorgan', 606 | ], 607 | }, 608 | { 609 | id: 42, 610 | name: 'Unique Paths', 611 | url: 'https://leetcode.com/problems/unique-paths/', 612 | pattern: ['Dynamic Programming'], 613 | difficulty: 'Medium', 614 | premium: false, 615 | companies: [ 616 | 'Google', 617 | 'Facebook', 618 | 'Amazon', 619 | 'Apple', 620 | 'Microsoft', 621 | 'Bloomberg', 622 | ], 623 | }, 624 | { 625 | id: 43, 626 | name: 'Jump Game', 627 | url: 'https://leetcode.com/problems/jump-game/', 628 | pattern: ['Dynamic Programming', 'Greedy'], 629 | difficulty: 'Medium', 630 | premium: false, 631 | companies: [ 632 | 'Amazon', 633 | 'Facebook', 634 | 'Uber', 635 | 'Oracle', 636 | 'Adobe', 637 | 'Microsoft', 638 | 'Bloomberg', 639 | ], 640 | }, 641 | { 642 | id: 44, 643 | name: 'Palindromic Substrings', 644 | url: 'https://leetcode.com/problems/palindromic-substrings/', 645 | pattern: ['Dynamic Programming'], 646 | difficulty: 'Medium', 647 | premium: false, 648 | companies: ['Facebook', 'Microsoft', 'Google', 'Goldman Sachs'], 649 | }, 650 | { 651 | id: 45, 652 | name: 'Number of Longest Increasing Subsequence', 653 | url: 654 | 'https://leetcode.com/problems/number-of-longest-increasing-subsequence/', 655 | pattern: ['Dynamic Programming'], 656 | difficulty: 'Medium', 657 | premium: false, 658 | companies: ['Amazon', 'Google'], 659 | }, 660 | { 661 | id: 46, 662 | name: 'Partition Equal Subset Sum', 663 | url: 'https://leetcode.com/problems/partition-equal-subset-sum/', 664 | pattern: ['Dynamic Programming'], 665 | difficulty: 'Medium', 666 | premium: false, 667 | companies: [ 668 | 'Facebook', 669 | 'Google', 670 | 'Amazon', 671 | 'Microsoft', 672 | 'Uber', 673 | 'Apple', 674 | 'Bloomberg', 675 | ], 676 | }, 677 | { 678 | id: 47, 679 | name: 'Partition to K Equal Sum Subsets', 680 | url: 'https://leetcode.com/problems/partition-to-k-equal-sum-subsets/', 681 | pattern: ['Dynamic Programming'], 682 | difficulty: 'Medium', 683 | premium: false, 684 | companies: ['LinkedIn', 'Facebook'], 685 | }, 686 | { 687 | id: 48, 688 | name: 'Best Time to Buy and Sell Stock with Cooldown', 689 | url: 690 | 'https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/', 691 | pattern: ['Dynamic Programming'], 692 | difficulty: 'Medium', 693 | premium: false, 694 | companies: ['Adobe', 'Bloomberg'], 695 | }, 696 | { 697 | id: 49, 698 | name: 'Counting Bits', 699 | url: 'https://leetcode.com/problems/counting-bits/', 700 | pattern: ['Dynamic Programming', 'Bit Manipulation'], 701 | difficulty: 'Easy', 702 | premium: false, 703 | companies: ['Google'], 704 | }, 705 | { 706 | id: 50, 707 | name: 'Linked List Cycle', 708 | url: 'https://leetcode.com/problems/linked-list-cycle/', 709 | pattern: ['Fast & Slow Pointers'], 710 | difficulty: 'Easy', 711 | premium: false, 712 | companies: [ 713 | 'Microsoft', 714 | 'Amazon', 715 | 'Bloomberg', 716 | 'Oracle', 717 | 'Facebook', 718 | 'Google', 719 | ], 720 | }, 721 | { 722 | id: 51, 723 | name: 'Middle of the Linked List', 724 | url: 'https://leetcode.com/problems/middle-of-the-linked-list/', 725 | pattern: ['Fast & Slow Pointers'], 726 | difficulty: 'Easy', 727 | premium: false, 728 | companies: ['Amazon', 'Apple', 'Microsoft', 'Adobe', 'Goldman Sachs'], 729 | }, 730 | { 731 | id: 52, 732 | name: 'Palindrome Linked List', 733 | url: 'https://leetcode.com/problems/palindrome-linked-list/', 734 | pattern: ['Fast & Slow Pointers'], 735 | difficulty: 'Easy', 736 | premium: false, 737 | companies: ['Facebook', 'Amazon', 'Microsoft', 'Intuit', 'Bloomberg'], 738 | }, 739 | { 740 | id: 53, 741 | name: 'Remove Linked List Elements', 742 | url: 'https://leetcode.com/problems/remove-linked-list-elements/', 743 | pattern: ['Fast & Slow Pointers'], 744 | difficulty: 'Easy', 745 | premium: false, 746 | companies: ['Facebook', 'Microsoft'], 747 | }, 748 | { 749 | id: 54, 750 | name: 'Remove Duplicates from Sorted List', 751 | url: 'https://leetcode.com/problems/remove-duplicates-from-sorted-list/', 752 | pattern: ['Fast & Slow Pointers'], 753 | difficulty: 'Easy', 754 | premium: false, 755 | companies: ['Amazon', 'Adobe', 'Facebook', 'Microsoft'], 756 | }, 757 | { 758 | id: 55, 759 | name: 'Linked List Cycle II', 760 | url: 'https://leetcode.com/problems/linked-list-cycle-ii/', 761 | pattern: ['Fast & Slow Pointers'], 762 | difficulty: 'Medium', 763 | premium: false, 764 | companies: ['Microsoft', 'Amazon', 'Goldman Sachs', 'Oracle'], 765 | }, 766 | { 767 | id: 56, 768 | name: 'Add Two Numbers', 769 | url: 'https://leetcode.com/problems/add-two-numbers/', 770 | pattern: ['Fast & Slow Pointers'], 771 | difficulty: 'Medium', 772 | premium: false, 773 | companies: [ 774 | 'Amazon', 775 | 'Bloomberg', 776 | 'Adobe', 777 | 'Microsoft', 778 | 'Facebook', 779 | 'Google', 780 | 'Apple', 781 | 'Uber', 782 | 'Capital One', 783 | 'Oracle', 784 | ], 785 | }, 786 | { 787 | id: 57, 788 | name: 'Remove Nth Node From End Of List', 789 | url: 'https://leetcode.com/problems/remove-nth-node-from-end-of-list/', 790 | pattern: ['Fast & Slow Pointers'], 791 | difficulty: 'Medium', 792 | premium: false, 793 | companies: ['Facebook', 'Microsoft', 'Amazon', 'Google', 'Apple'], 794 | }, 795 | { 796 | id: 58, 797 | name: 'Sort List', 798 | url: 'https://leetcode.com/problems/sort-list/', 799 | pattern: ['Fast & Slow Pointers'], 800 | difficulty: 'Medium', 801 | premium: false, 802 | companies: ['Facebook', 'Amazon', 'Apple', 'Uber'], 803 | }, 804 | { 805 | id: 59, 806 | name: 'Reorder List', 807 | url: 'https://leetcode.com/problems/reorder-list/', 808 | pattern: ['Fast & Slow Pointers'], 809 | difficulty: 'Medium', 810 | premium: false, 811 | companies: ['Amazon', 'Adobe', 'Facebook', 'Google', 'Snapchat', 'Uber'], 812 | }, 813 | { 814 | id: 60, 815 | name: 'Clone Graph', 816 | url: 'https://leetcode.com/problems/clone-graph/', 817 | pattern: ['BFS', 'DFS', 'Graph'], 818 | difficulty: 'Medium', 819 | premium: false, 820 | companies: [ 821 | 'Facebook', 822 | 'Microsoft', 823 | 'Amazon', 824 | 'Salesforce', 825 | 'Google', 826 | 'Twitter', 827 | 'Bloomberg', 828 | 'Oracle', 829 | 'Apple', 830 | ], 831 | }, 832 | { 833 | id: 61, 834 | name: 'Pacific Atlantic Water Flow', 835 | url: 'https://leetcode.com/problems/pacific-atlantic-water-flow/', 836 | pattern: ['BFS', 'DFS'], 837 | difficulty: 'Medium', 838 | premium: false, 839 | companies: ['Google', 'Amazon', 'Microsoft', 'Facebook', 'Apple'], 840 | }, 841 | { 842 | id: 62, 843 | name: 'Number of Islands', 844 | url: 'https://leetcode.com/problems/number-of-islands/', 845 | pattern: ['BFS', 'DFS', 'Union Find'], 846 | difficulty: 'Medium', 847 | premium: false, 848 | companies: [ 849 | 'Amazon', 850 | 'Microsoft', 851 | 'Bloomberg', 852 | 'Google', 853 | 'LinkedIn', 854 | 'Facebook', 855 | 'Apple', 856 | 'Oracle', 857 | 'Goldman Sachs', 858 | 'Salesforce', 859 | 'Lyft', 860 | 'Uber', 861 | 'Adobe', 862 | 'Qualtrics', 863 | ], 864 | }, 865 | { 866 | id: 63, 867 | name: 'Graph Valid Tree', 868 | url: 'https://leetcode.com/problems/graph-valid-tree/', 869 | pattern: ['BFS', 'DFS', 'Graph', 'Union Find'], 870 | difficulty: 'Medium', 871 | premium: true, 872 | companies: ['LinkedIn', 'Google', 'Bloomberg'], 873 | }, 874 | { 875 | id: 64, 876 | name: 'Number of Connected Components in an Undirected Graph', 877 | url: 878 | 'https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/', 879 | pattern: ['BFS', 'DFS', 'Graph', 'Union Find'], 880 | difficulty: 'Medium', 881 | premium: true, 882 | companies: ['Amazon', 'LinkedIn', 'Facebook', 'Pinterest'], 883 | }, 884 | { 885 | id: 65, 886 | name: 'Reverse Linked List', 887 | url: 'https://leetcode.com/problems/reverse-linked-list/', 888 | pattern: ['In-place reversal of a linked list'], 889 | difficulty: 'Easy', 890 | premium: false, 891 | companies: ['Microsoft', 'Bloomberg', 'Amazon', 'Facebook', 'Apple'], 892 | }, 893 | { 894 | id: 66, 895 | name: 'Reverse Linked List II', 896 | url: 'https://leetcode.com/problems/reverse-linked-list-ii/', 897 | pattern: ['In-place reversal of a linked list'], 898 | difficulty: 'Medium', 899 | premium: false, 900 | companies: ['Apple', 'Facebook', 'Amazon', 'Google', 'Adobe'], 901 | }, 902 | { 903 | id: 67, 904 | name: 'Rotate List', 905 | url: 'https://leetcode.com/problems/rotate-list/', 906 | pattern: ['In-place reversal of a linked list'], 907 | difficulty: 'Medium', 908 | premium: false, 909 | companies: ['Amazon', 'LinkedIn', 'Microsoft', 'Adobe', 'Apple', 'Oracle'], 910 | }, 911 | { 912 | id: 68, 913 | name: 'Swap Nodes in Pairs', 914 | url: 'https://leetcode.com/problems/swap-nodes-in-pairs/', 915 | pattern: ['In-place reversal of a linked list'], 916 | difficulty: 'Medium', 917 | premium: false, 918 | companies: ['Facebook', 'Amazon', 'Microsoft'], 919 | }, 920 | { 921 | id: 69, 922 | name: 'Odd Even Linked List', 923 | url: 'https://leetcode.com/problems/odd-even-linked-list/', 924 | pattern: ['In-place reversal of a linked list'], 925 | difficulty: 'Medium', 926 | premium: false, 927 | companies: [ 928 | 'Facebook', 929 | 'Microsoft', 930 | 'Bloomberg', 931 | 'Amazon', 932 | 'Adobe', 933 | 'Apple', 934 | ], 935 | }, 936 | { 937 | id: 70, 938 | name: 'Reverse Nodes in k-Group', 939 | url: 'https://leetcode.com/problems/reverse-nodes-in-k-group/', 940 | pattern: ['In-place reversal of a linked list'], 941 | difficulty: 'Hard', 942 | premium: false, 943 | companies: [ 944 | 'Capital One', 945 | 'Microsoft', 946 | 'Amazon', 947 | 'Google', 948 | 'Facebook', 949 | 'Snapchat', 950 | 'Oracle', 951 | ], 952 | }, 953 | { 954 | id: 71, 955 | name: 'Merge Two Sorted Lists', 956 | url: 'https://leetcode.com/problems/merge-two-sorted-lists/', 957 | pattern: ['Two Pointers'], 958 | difficulty: 'Easy', 959 | premium: false, 960 | companies: [ 961 | 'Amazon', 962 | 'Facebook', 963 | 'Microsoft', 964 | 'Adobe', 965 | 'Google', 966 | 'Bloomberg', 967 | 'Apple', 968 | 'Uber', 969 | ], 970 | }, 971 | { 972 | id: 72, 973 | name: 'Kth Smallest Element in a Sorted Matrix', 974 | url: 975 | 'https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/', 976 | pattern: ['Binary Search', 'Heap'], 977 | difficulty: 'Medium', 978 | premium: false, 979 | companies: ['Facebook', 'Amazon', 'Microsoft', 'Bloomberg'], 980 | }, 981 | { 982 | id: 73, 983 | name: 'Find K Pairs with Smallest Sums', 984 | url: 'https://leetcode.com/problems/find-k-pairs-with-smallest-sums/', 985 | pattern: ['Heap'], 986 | difficulty: 'Medium', 987 | premium: false, 988 | companies: ['LinkedIn', 'Microsoft', 'Apple'], 989 | }, 990 | { 991 | id: 74, 992 | name: 'Merge k Sorted Lists', 993 | url: 'https://leetcode.com/problems/merge-k-sorted-lists/', 994 | pattern: ['Heap'], 995 | difficulty: 'Hard', 996 | premium: false, 997 | companies: [ 998 | 'Facebook', 999 | 'Amazon', 1000 | 'Microsoft', 1001 | 'Google', 1002 | 'Apple', 1003 | 'Bloomberg', 1004 | 'Adobe', 1005 | 'Uber', 1006 | 'Qualtrics', 1007 | 'Oracle', 1008 | ], 1009 | }, 1010 | { 1011 | id: 75, 1012 | name: 'Smallest Range Covering Elements from K Lists', 1013 | url: 1014 | 'https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/', 1015 | pattern: ['Heap'], 1016 | difficulty: 'Hard', 1017 | premium: false, 1018 | companies: ['Google', 'Amazon', 'Microsoft', 'Pinterest'], 1019 | }, 1020 | { 1021 | id: 76, 1022 | name: 'Meeting Rooms', 1023 | url: 'https://leetcode.com/problems/meeting-rooms', 1024 | pattern: ['Intervals'], 1025 | difficulty: 'Easy', 1026 | premium: true, 1027 | companies: ['Amazon', 'Microsoft', 'Facebook'], 1028 | }, 1029 | { 1030 | id: 77, 1031 | name: 'Merge Intervals', 1032 | url: 'https://leetcode.com/problems/merge-intervals/', 1033 | pattern: ['Intervals'], 1034 | difficulty: 'Medium', 1035 | premium: false, 1036 | companies: [ 1037 | 'Amazon', 1038 | 'Facebook', 1039 | 'Microsoft', 1040 | 'Salesforce', 1041 | 'Google', 1042 | 'Uber', 1043 | 'Bloomberg', 1044 | 'Adobe', 1045 | 'Apple', 1046 | 'LinkedIn', 1047 | 'Twitter', 1048 | 'Oracle', 1049 | 'JPMorgan', 1050 | 'Snapchat', 1051 | ], 1052 | }, 1053 | { 1054 | id: 78, 1055 | name: 'Interval List Intersections', 1056 | url: 'https://leetcode.com/problems/interval-list-intersections/', 1057 | pattern: ['Intervals'], 1058 | difficulty: 'Medium', 1059 | premium: false, 1060 | companies: ['Facebook', 'Uber', 'Google'], 1061 | }, 1062 | { 1063 | id: 79, 1064 | name: 'Non-overlapping Intervals', 1065 | url: 'https://leetcode.com/problems/non-overlapping-intervals/', 1066 | pattern: ['Intervals'], 1067 | difficulty: 'Medium', 1068 | premium: false, 1069 | companies: ['Amazon', 'Facebook', 'Oracle'], 1070 | }, 1071 | { 1072 | id: 80, 1073 | name: 'Meeting Rooms II', 1074 | url: 'https://leetcode.com/problems/meeting-rooms-ii/', 1075 | pattern: ['Heap', 'Intervals'], 1076 | difficulty: 'Medium', 1077 | premium: true, 1078 | companies: [ 1079 | 'Amazon', 1080 | 'Facebook', 1081 | 'Bloomberg', 1082 | 'Microsoft', 1083 | 'Google', 1084 | 'Oracle', 1085 | 'Uber', 1086 | 'Twitter', 1087 | 'Snapchat', 1088 | 'Qualtrics', 1089 | 'Adobe', 1090 | 'Quora', 1091 | 'Goldman Sachs', 1092 | ], 1093 | }, 1094 | { 1095 | id: 81, 1096 | name: 'Task Scheduler', 1097 | url: 'https://leetcode.com/problems/task-scheduler/', 1098 | pattern: ['Greedy', 'Heap'], 1099 | difficulty: 'Medium', 1100 | premium: false, 1101 | companies: [ 1102 | 'Facebook', 1103 | 'Google', 1104 | 'Uber', 1105 | 'Amazon', 1106 | 'Microsoft', 1107 | 'Salesforce', 1108 | ], 1109 | }, 1110 | { 1111 | id: 82, 1112 | name: 'Minimum Number of Arrows to Burst Balloons', 1113 | url: 1114 | 'https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/', 1115 | pattern: ['Greedy'], 1116 | difficulty: 'Medium', 1117 | premium: false, 1118 | companies: ['Apple'], 1119 | }, 1120 | { 1121 | id: 83, 1122 | name: 'Insert Interval', 1123 | url: 'https://leetcode.com/problems/insert-interval/', 1124 | pattern: ['Intervals'], 1125 | difficulty: 'Medium', 1126 | premium: false, 1127 | companies: [ 1128 | 'Amazon', 1129 | 'Google', 1130 | 'Facebook', 1131 | 'LinkedIn', 1132 | 'Microsoft', 1133 | 'Twitter', 1134 | 'Citadel', 1135 | ], 1136 | }, 1137 | { 1138 | id: 84, 1139 | name: 'Employee Free Time', 1140 | url: 'https://leetcode.com/problems/employee-free-time/', 1141 | pattern: ['Heap', 'Greedy'], 1142 | difficulty: 'Hard', 1143 | premium: true, 1144 | companies: [ 1145 | 'Pinterest', 1146 | 'Amazon', 1147 | 'Airbnb', 1148 | 'Snapchat', 1149 | 'Google', 1150 | 'Facebook', 1151 | 'Apple', 1152 | 'Oracle', 1153 | 'Uber', 1154 | ], 1155 | }, 1156 | { 1157 | id: 85, 1158 | name: 'Binary Search', 1159 | url: 'https://leetcode.com/problems/binary-search/', 1160 | pattern: ['Binary Search'], 1161 | difficulty: 'Easy', 1162 | premium: false, 1163 | companies: ['Adobe', 'Apple', 'Uber', 'Goldman Sachs'], 1164 | }, 1165 | { 1166 | id: 86, 1167 | name: 'Find Smallest Letter Greater Than Target', 1168 | url: 1169 | 'https://leetcode.com/problems/find-smallest-letter-greater-than-target/', 1170 | pattern: ['Binary Search'], 1171 | difficulty: 'Easy', 1172 | premium: false, 1173 | companies: ['LinkedIn'], 1174 | }, 1175 | { 1176 | id: 87, 1177 | name: 'Peak Index in a Mountain Array', 1178 | url: 'https://leetcode.com/problems/peak-index-in-a-mountain-array/', 1179 | pattern: ['Binary Search'], 1180 | difficulty: 'Easy', 1181 | premium: false, 1182 | companies: ['Google', 'Amazon', 'Bloomberg', 'Facebook'], 1183 | }, 1184 | { 1185 | id: 88, 1186 | name: 'Find Minimum in Rotated Sorted Array', 1187 | url: 'https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/', 1188 | pattern: ['Binary Search'], 1189 | difficulty: 'Medium', 1190 | premium: false, 1191 | companies: [ 1192 | 'Facebook', 1193 | 'Microsoft', 1194 | 'Amazon', 1195 | 'Bloomberg', 1196 | 'Uber', 1197 | 'Adobe', 1198 | 'Apple', 1199 | ], 1200 | }, 1201 | { 1202 | id: 89, 1203 | name: 'Find Peak Element', 1204 | url: 'https://leetcode.com/problems/find-peak-element/', 1205 | pattern: ['Binary Search'], 1206 | difficulty: 'Medium', 1207 | premium: false, 1208 | companies: ['Facebook', 'Amazon', 'Uber', 'Google', 'Microsoft'], 1209 | }, 1210 | { 1211 | id: 90, 1212 | name: 'Search in Rotated Sorted Array', 1213 | url: 'https://leetcode.com/problems/search-in-rotated-sorted-array/', 1214 | pattern: ['Binary Search'], 1215 | difficulty: 'Medium', 1216 | premium: false, 1217 | companies: [ 1218 | 'Microsoft', 1219 | 'Amazon', 1220 | 'LinkedIn', 1221 | 'Facebook', 1222 | 'Bloomberg', 1223 | 'Adobe', 1224 | 'Apple', 1225 | 'Goldman Sachs', 1226 | 'Oracle', 1227 | 'Uber', 1228 | 'Morgan Stanley', 1229 | ], 1230 | }, 1231 | { 1232 | id: 91, 1233 | name: 'Search in Rotated Sorted Array II', 1234 | url: 'https://leetcode.com/problems/search-in-rotated-sorted-array-ii/', 1235 | pattern: ['Binary Search'], 1236 | difficulty: 'Medium', 1237 | premium: false, 1238 | companies: ['LinkedIn', 'Amazon', 'Facebook', 'Microsoft'], 1239 | }, 1240 | { 1241 | id: 92, 1242 | name: 'Search a 2D Matrix', 1243 | url: 'https://leetcode.com/problems/search-a-2d-matrix/', 1244 | pattern: ['Binary Search'], 1245 | difficulty: 'Medium', 1246 | premium: false, 1247 | companies: [ 1248 | 'Amazon', 1249 | 'Facebook', 1250 | 'Bloomberg', 1251 | 'Microsoft', 1252 | 'Uber', 1253 | 'Google', 1254 | 'Apple', 1255 | ], 1256 | }, 1257 | { 1258 | id: 93, 1259 | name: 'Search a 2D Matrix II', 1260 | url: 'https://leetcode.com/problems/search-a-2d-matrix-ii/', 1261 | pattern: ['Binary Search'], 1262 | difficulty: 'Medium', 1263 | premium: false, 1264 | companies: ['Microsoft', 'Amazon', 'Facebook', 'Apple', 'Uber'], 1265 | }, 1266 | { 1267 | id: 94, 1268 | name: 'Find K Closest Elements', 1269 | url: 'https://leetcode.com/problems/find-k-closest-elements/', 1270 | pattern: ['Binary Search'], 1271 | difficulty: 'Medium', 1272 | premium: false, 1273 | companies: [ 1274 | 'Facebook', 1275 | 'Amazon', 1276 | 'Google', 1277 | 'Uber', 1278 | 'Microsoft', 1279 | 'Bloomberg', 1280 | ], 1281 | }, 1282 | { 1283 | id: 95, 1284 | name: 'Count of Range Sum', 1285 | url: 'https://leetcode.com/problems/count-of-range-sum/', 1286 | pattern: ['Binary Search'], 1287 | difficulty: 'Hard', 1288 | premium: false, 1289 | companies: ['Google'], 1290 | }, 1291 | { 1292 | id: 96, 1293 | name: 'Minimum Size Subarray Sum', 1294 | url: 'https://leetcode.com/problems/minimum-size-subarray-sum/', 1295 | pattern: ['Sliding Window'], 1296 | difficulty: 'Medium', 1297 | premium: false, 1298 | companies: ['Goldman Sachs', 'Facebook', 'Amazon', 'Google'], 1299 | }, 1300 | { 1301 | id: 97, 1302 | name: 'Fruit Into Baskets', 1303 | url: 'https://leetcode.com/problems/fruit-into-baskets/', 1304 | pattern: ['Sliding Window'], 1305 | difficulty: 'Medium', 1306 | premium: false, 1307 | companies: ['Amazon'], 1308 | }, 1309 | { 1310 | id: 98, 1311 | name: 'Permutation in String', 1312 | url: 'https://leetcode.com/problems/permutation-in-string/', 1313 | pattern: ['Sliding Window'], 1314 | difficulty: 'Medium', 1315 | premium: false, 1316 | companies: ['Oracle', 'Facebook'], 1317 | }, 1318 | { 1319 | id: 99, 1320 | name: 'Longest Repeating Character Replacement', 1321 | url: 1322 | 'https://leetcode.com/problems/longest-repeating-character-replacement/', 1323 | pattern: ['Sliding Window'], 1324 | difficulty: 'Medium', 1325 | premium: false, 1326 | companies: ['Facebook', 'Uber', 'Amazon', 'Adobe'], 1327 | }, 1328 | { 1329 | id: 100, 1330 | name: 'Sliding Window Maximum', 1331 | url: 'https://leetcode.com/problems/sliding-window-maximum/', 1332 | pattern: ['Sliding Window'], 1333 | difficulty: 'Hard', 1334 | premium: false, 1335 | companies: [ 1336 | 'Amazon', 1337 | 'Facebook', 1338 | 'Goldman Sachs', 1339 | 'Citadel', 1340 | 'Google', 1341 | 'Uber', 1342 | 'Microsoft', 1343 | 'Salesforce', 1344 | 'Apple', 1345 | 'Twitter', 1346 | 'Atlassian', 1347 | ], 1348 | }, 1349 | { 1350 | id: 101, 1351 | name: 'Longest Substring Without Repeating Characters', 1352 | url: 1353 | 'https://leetcode.com/problems/longest-substring-without-repeating-characters/', 1354 | pattern: ['Sliding Window'], 1355 | difficulty: 'Medium', 1356 | premium: false, 1357 | companies: [ 1358 | 'Amazon', 1359 | 'Microsoft', 1360 | 'Bloomberg', 1361 | 'Facebook', 1362 | 'Adobe', 1363 | 'Google', 1364 | 'Apple', 1365 | 'Uber', 1366 | 'Goldman Sachs', 1367 | ], 1368 | }, 1369 | { 1370 | id: 102, 1371 | name: 'Minimum Number of K Consecutive Bit Flips', 1372 | url: 1373 | 'https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/', 1374 | pattern: ['Sliding Window'], 1375 | difficulty: 'Hard', 1376 | premium: false, 1377 | companies: ['Adobe'], 1378 | }, 1379 | { 1380 | id: 103, 1381 | name: 'Count Unique Characters of All Substrings of a Given String', 1382 | url: 1383 | 'https://leetcode.com/problems/count-unique-characters-of-all-substrings-of-a-given-string/', 1384 | pattern: ['Sliding Window'], 1385 | difficulty: 'Hard', 1386 | premium: false, 1387 | companies: ['Amazon'], 1388 | }, 1389 | { 1390 | id: 104, 1391 | name: 'Minimum Window Substring', 1392 | url: 'https://leetcode.com/problems/minimum-window-substring/', 1393 | pattern: ['Sliding Window'], 1394 | difficulty: 'Hard', 1395 | premium: false, 1396 | companies: [ 1397 | 'Facebook', 1398 | 'Amazon', 1399 | 'LinkedIn', 1400 | 'Snapchat', 1401 | 'Google', 1402 | 'Lyft', 1403 | 'Adobe', 1404 | ], 1405 | }, 1406 | { 1407 | id: 105, 1408 | name: 'Substring with Concatenation of All Words', 1409 | url: 1410 | 'https://leetcode.com/problems/substring-with-concatenation-of-all-words/', 1411 | pattern: ['Sliding Window'], 1412 | difficulty: 'Hard', 1413 | premium: false, 1414 | companies: ['Apple'], 1415 | }, 1416 | { 1417 | id: 106, 1418 | name: 'Kth Smallest Element in a BST', 1419 | url: 'https://leetcode.com/problems/kth-smallest-element-in-a-bst/', 1420 | pattern: ['DFS'], 1421 | difficulty: 'Medium', 1422 | premium: false, 1423 | companies: ['Amazon', 'Facebook'], 1424 | }, 1425 | { 1426 | id: 107, 1427 | name: 'K Closest Points to Origin', 1428 | url: 'https://leetcode.com/problems/k-closest-points-to-origin/', 1429 | pattern: ['Heap'], 1430 | difficulty: 'Medium', 1431 | premium: false, 1432 | companies: ['Facebook', 'Amazon', 'LinkedIn', 'Google', 'Asana'], 1433 | }, 1434 | { 1435 | id: 108, 1436 | name: 'Top K Frequent Elements', 1437 | url: 'https://leetcode.com/problems/top-k-frequent-elements/', 1438 | pattern: ['Heap'], 1439 | difficulty: 'Medium', 1440 | premium: false, 1441 | companies: [ 1442 | 'Facebook', 1443 | 'Amazon', 1444 | 'Bloomberg', 1445 | 'Microsoft', 1446 | 'Uber', 1447 | 'Apple', 1448 | 'Google', 1449 | 'Adobe', 1450 | 'Snapchat', 1451 | 'Oracle', 1452 | 'LinkedIn', 1453 | ], 1454 | }, 1455 | { 1456 | id: 109, 1457 | name: 'Sort Characters By Frequency', 1458 | url: 'https://leetcode.com/problems/sort-characters-by-frequency/', 1459 | pattern: ['Heap'], 1460 | difficulty: 'Medium', 1461 | premium: false, 1462 | companies: ['Amazon', 'Bloomberg', 'Facebook'], 1463 | }, 1464 | { 1465 | id: 110, 1466 | name: 'Kth Largest Element in an Array', 1467 | url: 'https://leetcode.com/problems/kth-largest-element-in-an-array/', 1468 | pattern: ['Heap', 'QuickSelect'], 1469 | difficulty: 'Medium', 1470 | premium: false, 1471 | companies: [ 1472 | 'Facebook', 1473 | 'Amazon', 1474 | 'LinkedIn', 1475 | 'Microsoft', 1476 | 'Google', 1477 | 'Goldman Sachs', 1478 | 'Uber', 1479 | 'Oracle', 1480 | ], 1481 | }, 1482 | { 1483 | id: 111, 1484 | name: 'Reorganize String', 1485 | url: 'https://leetcode.com/problems/reorganize-string/', 1486 | pattern: ['Greedy', 'Heap'], 1487 | difficulty: 'Medium', 1488 | premium: false, 1489 | companies: ['Amazon', 'Facebook', 'Google', 'Apple', 'Uber', 'Microsoft'], 1490 | }, 1491 | { 1492 | id: 112, 1493 | name: 'Rearrange String k Distance Apart', 1494 | url: 'https://leetcode.com/problems/rearrange-string-k-distance-apart', 1495 | pattern: ['Greedy', 'Heap'], 1496 | difficulty: 'Hard', 1497 | premium: true, 1498 | companies: ['Twitter'], 1499 | }, 1500 | { 1501 | id: 113, 1502 | name: 'Course Schedule III', 1503 | url: 'https://leetcode.com/problems/course-schedule-iii/', 1504 | pattern: ['Greedy', 'Heap'], 1505 | difficulty: 'Hard', 1506 | premium: false, 1507 | companies: ['Amazon'], 1508 | }, 1509 | { 1510 | id: 114, 1511 | name: 'Maximum Frequency Stack', 1512 | url: 'https://leetcode.com/problems/maximum-frequency-stack/', 1513 | pattern: ['Bucket Sort', 'Heap'], 1514 | difficulty: 'Hard', 1515 | premium: false, 1516 | companies: ['Microsoft', 'Amazon', 'Apple', 'Facebook'], 1517 | }, 1518 | { 1519 | id: 115, 1520 | name: 'Course Schedule', 1521 | url: 'https://leetcode.com/problems/course-schedule/', 1522 | pattern: ['BFS', 'DFS', 'Graph', 'Topological Sort'], 1523 | difficulty: 'Medium', 1524 | premium: false, 1525 | companies: [ 1526 | 'Amazon', 1527 | 'Microsoft', 1528 | 'Facebook', 1529 | 'Google', 1530 | 'Oracle', 1531 | 'Apple', 1532 | 'Snapchat', 1533 | ], 1534 | }, 1535 | { 1536 | id: 116, 1537 | name: 'Course Schedule II', 1538 | url: 'https://leetcode.com/problems/course-schedule-ii/', 1539 | pattern: ['BFS', 'DFS', 'Graph', 'Topological Sort'], 1540 | difficulty: 'Medium', 1541 | premium: false, 1542 | companies: [ 1543 | 'Amazon', 1544 | 'Microsoft', 1545 | 'Google', 1546 | 'Facebook', 1547 | 'Snapchat', 1548 | 'Uber', 1549 | 'Apple', 1550 | 'Lyft', 1551 | 'Bloomberg', 1552 | ], 1553 | }, 1554 | { 1555 | id: 117, 1556 | name: 'Minimum Height Trees', 1557 | url: 'https://leetcode.com/problems/minimum-height-trees/', 1558 | pattern: ['BFS', 'Graph', 'Topological Sort'], 1559 | difficulty: 'Medium', 1560 | premium: false, 1561 | companies: ['Amazon', 'Facebook', 'Google', 'Microsoft'], 1562 | }, 1563 | { 1564 | id: 118, 1565 | name: 'Alien Dictionary', 1566 | url: 'https://leetcode.com/problems/alien-dictionary', 1567 | pattern: ['Graph', 'Topological Sort'], 1568 | difficulty: 'Hard', 1569 | premium: true, 1570 | companies: [ 1571 | 'Facebook', 1572 | 'Google', 1573 | 'Amazon', 1574 | 'Airbnb', 1575 | 'Pinterest', 1576 | 'Uber', 1577 | 'Microsoft', 1578 | ], 1579 | }, 1580 | { 1581 | id: 119, 1582 | name: 'Sequence Reconstruction', 1583 | url: 'https://leetcode.com/problems/sequence-reconstruction', 1584 | pattern: ['Graph', 'Topological Sort'], 1585 | difficulty: 'Medium', 1586 | premium: true, 1587 | companies: ['Google'], 1588 | }, 1589 | { 1590 | id: 120, 1591 | name: 'Binary Tree Level Order Traversal II', 1592 | url: 'https://leetcode.com/problems/binary-tree-level-order-traversal-ii/', 1593 | pattern: ['BFS'], 1594 | difficulty: 'Medium', 1595 | premium: false, 1596 | companies: ['Amazon'], 1597 | }, 1598 | { 1599 | id: 121, 1600 | name: 'Average of Levels in Binary Tree', 1601 | url: 'https://leetcode.com/problems/average-of-levels-in-binary-tree/', 1602 | pattern: ['BFS'], 1603 | difficulty: 'Easy', 1604 | premium: false, 1605 | companies: ['Facebook', 'Amazon'], 1606 | }, 1607 | { 1608 | id: 122, 1609 | name: 'Minimum Depth of Binary Tree', 1610 | url: 'https://leetcode.com/problems/minimum-depth-of-binary-tree/', 1611 | pattern: ['BFS', 'DFS'], 1612 | difficulty: 'Easy', 1613 | premium: false, 1614 | companies: ['Facebook', 'Goldman Sachs'], 1615 | }, 1616 | { 1617 | id: 123, 1618 | name: 'Binary Tree Level Order Traversal', 1619 | url: 'https://leetcode.com/problems/binary-tree-level-order-traversal/', 1620 | pattern: ['BFS'], 1621 | difficulty: 'Medium', 1622 | premium: false, 1623 | companies: [ 1624 | 'LinkedIn', 1625 | 'Amazon', 1626 | 'Facebook', 1627 | 'Bloomberg', 1628 | 'Microsoft', 1629 | 'Apple', 1630 | 'Oracle', 1631 | 'Google', 1632 | ], 1633 | }, 1634 | { 1635 | id: 124, 1636 | name: 'Binary Tree Zigzag Level Order Traversal', 1637 | url: 1638 | 'https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/', 1639 | pattern: ['BFS'], 1640 | difficulty: 'Medium', 1641 | premium: false, 1642 | companies: [ 1643 | 'Amazon', 1644 | 'Facebook', 1645 | 'Microsoft', 1646 | 'Bloomberg', 1647 | 'Google', 1648 | 'Adobe', 1649 | 'LinkedIn', 1650 | 'Qualtrics', 1651 | 'Salesforce', 1652 | ], 1653 | }, 1654 | { 1655 | id: 125, 1656 | name: 'Populating Next Right Pointers in Each Node', 1657 | url: 1658 | 'https://leetcode.com/problems/populating-next-right-pointers-in-each-node/', 1659 | pattern: ['BFS'], 1660 | difficulty: 'Medium', 1661 | premium: false, 1662 | companies: ['Facebook', 'Microsoft', 'Amazon', 'Bloomberg'], 1663 | }, 1664 | { 1665 | id: 126, 1666 | name: 'Populating Next Right Pointers in Each Node II', 1667 | url: 1668 | 'https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/', 1669 | pattern: ['BFS'], 1670 | difficulty: 'Medium', 1671 | premium: false, 1672 | companies: ['Amazon', 'Bloomberg', 'Microsoft', 'Facebook'], 1673 | }, 1674 | { 1675 | id: 127, 1676 | name: 'Binary Tree Right Side View', 1677 | url: 'https://leetcode.com/problems/binary-tree-right-side-view/', 1678 | pattern: ['BFS', 'DFS'], 1679 | difficulty: 'Medium', 1680 | premium: false, 1681 | companies: [ 1682 | 'Facebook', 1683 | 'Bloomberg', 1684 | 'Amazon', 1685 | 'Oracle', 1686 | 'Qualtrics', 1687 | 'Adobe', 1688 | 'Goldman Sachs', 1689 | ], 1690 | }, 1691 | { 1692 | id: 128, 1693 | name: 'All Nodes Distance K in Binary Tree', 1694 | url: 'https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/', 1695 | pattern: ['BFS', 'DFS'], 1696 | difficulty: 'Medium', 1697 | premium: false, 1698 | companies: ['Facebook', 'Amazon', 'Apple', 'Oracle'], 1699 | }, 1700 | { 1701 | id: 129, 1702 | name: 'Same Tree', 1703 | url: 'https://leetcode.com/problems/same-tree/', 1704 | pattern: ['DFS'], 1705 | difficulty: 'Easy', 1706 | premium: false, 1707 | companies: [ 1708 | 'LinkedIn', 1709 | 'Google', 1710 | 'Microsoft', 1711 | 'Amazon', 1712 | 'Facebook', 1713 | 'Apple', 1714 | 'Adobe', 1715 | 'Oracle', 1716 | ], 1717 | }, 1718 | { 1719 | id: 130, 1720 | name: 'Path Sum', 1721 | url: 'https://leetcode.com/problems/path-sum/', 1722 | pattern: ['DFS'], 1723 | difficulty: 'Easy', 1724 | premium: false, 1725 | companies: ['Amazon', 'Facebook', 'Oracle'], 1726 | }, 1727 | { 1728 | id: 131, 1729 | name: 'Maximum Depth of Binary Tree', 1730 | url: 'https://leetcode.com/problems/maximum-depth-of-binary-tree/', 1731 | pattern: ['DFS'], 1732 | difficulty: 'Easy', 1733 | premium: false, 1734 | companies: ['LinkedIn', 'Google', 'Apple', 'Amazon'], 1735 | }, 1736 | { 1737 | id: 132, 1738 | name: 'Diameter of Binary Tree', 1739 | url: 'https://leetcode.com/problems/diameter-of-binary-tree/', 1740 | pattern: ['DFS'], 1741 | difficulty: 'Easy', 1742 | premium: false, 1743 | companies: [ 1744 | 'Facebook', 1745 | 'Amazon', 1746 | 'Google', 1747 | 'Bloomberg', 1748 | 'Apple', 1749 | 'Microsoft', 1750 | 'Adobe', 1751 | ], 1752 | }, 1753 | { 1754 | id: 133, 1755 | name: 'Merge Two Binary Trees', 1756 | url: 'https://leetcode.com/problems/merge-two-binary-trees/', 1757 | pattern: ['DFS'], 1758 | difficulty: 'Easy', 1759 | premium: false, 1760 | companies: ['Amazon', 'Adobe'], 1761 | }, 1762 | { 1763 | id: 134, 1764 | name: 'Lowest Common Ancestor of a Binary Search Tree', 1765 | url: 1766 | 'https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/', 1767 | pattern: ['DFS'], 1768 | difficulty: 'Easy', 1769 | premium: false, 1770 | companies: ['LinkedIn', 'Facebook', 'Microsoft', 'Google', 'Uber'], 1771 | }, 1772 | { 1773 | id: 135, 1774 | name: 'Subtree of Another Tree', 1775 | url: 'https://leetcode.com/problems/subtree-of-another-tree/', 1776 | pattern: ['DFS'], 1777 | difficulty: 'Easy', 1778 | premium: false, 1779 | companies: ['Facebook', 'Amazon', 'Microsoft'], 1780 | }, 1781 | { 1782 | id: 136, 1783 | name: 'Invert Binary Tree', 1784 | url: 'https://leetcode.com/problems/invert-binary-tree/', 1785 | pattern: ['DFS'], 1786 | difficulty: 'Easy', 1787 | premium: false, 1788 | companies: ['Amazon', 'Google', 'Facebook', 'Adobe', 'Apple'], 1789 | }, 1790 | { 1791 | id: 137, 1792 | name: 'Path Sum II', 1793 | url: 'https://leetcode.com/problems/path-sum-ii/', 1794 | pattern: ['DFS'], 1795 | difficulty: 'Medium', 1796 | premium: false, 1797 | companies: ['Amazon', 'Google', 'Facebook', 'Adobe', 'Apple'], 1798 | }, 1799 | { 1800 | id: 138, 1801 | name: 'Path Sum III', 1802 | url: 'https://leetcode.com/problems/path-sum-iii/', 1803 | pattern: ['DFS'], 1804 | difficulty: 'Medium', 1805 | premium: false, 1806 | companies: ['Microsoft', 'Facebook', 'Google', 'Oracle'], 1807 | }, 1808 | { 1809 | id: 139, 1810 | name: 'Lowest Common Ancestor of a Binary Tree', 1811 | url: 1812 | 'https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/', 1813 | pattern: ['DFS'], 1814 | difficulty: 'Medium', 1815 | premium: false, 1816 | companies: [ 1817 | 'Facebook', 1818 | 'Amazon', 1819 | 'LinkedIn', 1820 | 'Google', 1821 | 'Microsoft', 1822 | 'Adobe', 1823 | 'Apple', 1824 | 'Salesforce', 1825 | 'Oracle', 1826 | 'Bloomberg', 1827 | 'Intuit', 1828 | ], 1829 | }, 1830 | { 1831 | id: 140, 1832 | name: 'Maximum Binary Tree', 1833 | url: 'https://leetcode.com/problems/maximum-binary-tree/', 1834 | pattern: ['DFS'], 1835 | difficulty: 'Medium', 1836 | premium: false, 1837 | companies: ['Amazon'], 1838 | }, 1839 | { 1840 | id: 141, 1841 | name: 'Maximum Width of Binary Tree', 1842 | url: 'https://leetcode.com/problems/maximum-width-of-binary-tree/', 1843 | pattern: ['DFS'], 1844 | difficulty: 'Medium', 1845 | premium: false, 1846 | companies: ['Amazon', 'Google', 'Bloomberg', 'Apple', 'Adobe'], 1847 | }, 1848 | { 1849 | id: 142, 1850 | name: 'Construct Binary Tree from Preorder and Inorder Traversal', 1851 | url: 1852 | 'https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/', 1853 | pattern: ['DFS'], 1854 | difficulty: 'Medium', 1855 | premium: false, 1856 | companies: ['Amazon', 'Microsoft', 'Adobe', 'Bloomberg', 'Apple'], 1857 | }, 1858 | { 1859 | id: 143, 1860 | name: 'Validate Binary Search Tree', 1861 | url: 'https://leetcode.com/problems/validate-binary-search-tree/', 1862 | pattern: ['DFS'], 1863 | difficulty: 'Medium', 1864 | premium: false, 1865 | companies: [ 1866 | 'Amazon', 1867 | 'Bloomberg', 1868 | 'Microsoft', 1869 | 'Facebook', 1870 | 'Google', 1871 | 'Adobe', 1872 | 'Apple', 1873 | 'Qualtrics', 1874 | 'Lyft', 1875 | ], 1876 | }, 1877 | { 1878 | id: 144, 1879 | name: 'Implement Trie (Prefix Tree)', 1880 | url: 'https://leetcode.com/problems/implement-trie-prefix-tree/', 1881 | pattern: ['Design', 'Trie'], 1882 | difficulty: 'Medium', 1883 | premium: false, 1884 | companies: [ 1885 | 'Amazon', 1886 | 'Twitter', 1887 | 'Google', 1888 | 'Facebook', 1889 | 'Microsoft', 1890 | 'Apple', 1891 | ], 1892 | }, 1893 | { 1894 | id: 145, 1895 | name: 'Binary Tree Maximum Path Sum', 1896 | url: 'https://leetcode.com/problems/binary-tree-maximum-path-sum/', 1897 | pattern: ['DFS'], 1898 | difficulty: 'Hard', 1899 | premium: false, 1900 | companies: [ 1901 | 'Facebook', 1902 | 'Amazon', 1903 | 'Google', 1904 | 'Microsoft', 1905 | 'Adobe', 1906 | 'Bloomberg', 1907 | 'Oracle', 1908 | 'Snapchat', 1909 | ], 1910 | }, 1911 | { 1912 | id: 146, 1913 | name: 'Serialize and Deserialize Binary Tree', 1914 | url: 'https://leetcode.com/problems/serialize-and-deserialize-binary-tree/', 1915 | pattern: ['Design'], 1916 | difficulty: 'Hard', 1917 | premium: false, 1918 | companies: [ 1919 | 'LinkedIn', 1920 | 'Amazon', 1921 | 'Microsoft', 1922 | 'Facebook', 1923 | 'Oracle', 1924 | 'Uber', 1925 | 'Adobe', 1926 | 'Snapchat', 1927 | 'Qualtrics', 1928 | 'Google', 1929 | 'Quora', 1930 | ], 1931 | }, 1932 | { 1933 | id: 147, 1934 | name: 'Word Search II', 1935 | url: 'https://leetcode.com/problems/word-search-ii/', 1936 | pattern: ['DFS', 'Trie'], 1937 | difficulty: 'Hard', 1938 | premium: false, 1939 | companies: [ 1940 | 'Amazon', 1941 | 'Uber', 1942 | 'Microsoft', 1943 | 'Apple', 1944 | 'Twitter', 1945 | 'Snapchat', 1946 | 'Facebook', 1947 | 'Bloomberg', 1948 | 'Google', 1949 | 'Salesforce', 1950 | ], 1951 | }, 1952 | { 1953 | id: 148, 1954 | name: 'Find Median from Data Stream', 1955 | url: 'https://leetcode.com/problems/find-median-from-data-stream/', 1956 | pattern: ['Heap'], 1957 | difficulty: 'Hard', 1958 | premium: false, 1959 | companies: [ 1960 | 'Amazon', 1961 | 'Microsoft', 1962 | 'Apple', 1963 | 'Facebook', 1964 | 'Google', 1965 | 'Bloomberg', 1966 | 'Uber', 1967 | 'Airbnb', 1968 | ], 1969 | }, 1970 | { 1971 | id: 149, 1972 | name: 'Sliding Window Median', 1973 | url: 'https://leetcode.com/problems/sliding-window-median/', 1974 | pattern: ['Heap'], 1975 | difficulty: 'Hard', 1976 | premium: false, 1977 | companies: ['Facebook', 'Amazon'], 1978 | }, 1979 | { 1980 | id: 150, 1981 | name: 'Two Sum', 1982 | url: 'https://leetcode.com/problems/two-sum/', 1983 | pattern: ['Two Pointers'], 1984 | difficulty: 'Easy', 1985 | premium: false, 1986 | companies: [ 1987 | 'Amazon', 1988 | 'Google', 1989 | 'Adobe', 1990 | 'Apple', 1991 | 'Microsoft', 1992 | 'Facebook', 1993 | 'Bloomberg', 1994 | 'Uber', 1995 | 'Oracle', 1996 | 'Morgan Stanley', 1997 | 'Citadel', 1998 | 'Salesforce', 1999 | 'Goldman Sachs', 2000 | 'JPMorgan', 2001 | 'Snapchat', 2002 | ], 2003 | }, 2004 | { 2005 | id: 151, 2006 | name: 'Squares of a Sorted Array', 2007 | url: 'https://leetcode.com/problems/squares-of-a-sorted-array/', 2008 | pattern: ['Two Pointers'], 2009 | difficulty: 'Easy', 2010 | premium: false, 2011 | companies: ['Facebook', 'Amazon', 'Google', 'Adobe', 'Apple', 'Uber'], 2012 | }, 2013 | { 2014 | id: 152, 2015 | name: 'Backspace String Compare', 2016 | url: 'https://leetcode.com/problems/backspace-string-compare/', 2017 | pattern: ['Two Pointers'], 2018 | difficulty: 'Easy', 2019 | premium: false, 2020 | companies: ['Facebook', 'Amazon', 'Apple', 'Google', 'Microsoft'], 2021 | }, 2022 | { 2023 | id: 153, 2024 | name: '3 Sum', 2025 | url: 'https://leetcode.com/problems/3sum/', 2026 | pattern: ['Two Pointers'], 2027 | difficulty: 'Medium', 2028 | premium: false, 2029 | companies: [ 2030 | 'Amazon', 2031 | 'Facebook', 2032 | 'Apple', 2033 | 'Microsoft', 2034 | 'Adobe', 2035 | 'Google', 2036 | 'Bloomberg', 2037 | 'Intuit', 2038 | 'Qualtrics', 2039 | 'Salesforce', 2040 | 'Goldman Sachs', 2041 | 'Uber', 2042 | 'Oracle', 2043 | ], 2044 | }, 2045 | { 2046 | id: 154, 2047 | name: '3 Sum Closest', 2048 | url: 'https://leetcode.com/problems/3sum-closest/', 2049 | pattern: ['Two Pointers'], 2050 | difficulty: 'Medium', 2051 | premium: false, 2052 | companies: [ 2053 | 'Facebook', 2054 | 'Amazon', 2055 | 'Capital One', 2056 | 'Apple', 2057 | 'Google', 2058 | 'Adobe', 2059 | 'Microsoft', 2060 | 'Oracle', 2061 | ], 2062 | }, 2063 | { 2064 | id: 155, 2065 | name: 'Subarrays with Product Less than K', 2066 | url: 'https://leetcode.com/problems/subarray-product-less-than-k/', 2067 | pattern: ['Two Pointers'], 2068 | difficulty: 'Medium', 2069 | premium: false, 2070 | companies: ['LinkedIn', 'Amazon', 'Microsoft'], 2071 | }, 2072 | { 2073 | id: 156, 2074 | name: 'Sort Colours', 2075 | url: 'https://leetcode.com/problems/sort-colors/', 2076 | pattern: ['Two Pointers'], 2077 | difficulty: 'Medium', 2078 | premium: false, 2079 | companies: [ 2080 | 'Microsoft', 2081 | 'Amazon', 2082 | 'Adobe', 2083 | 'Facebook', 2084 | 'Apple', 2085 | 'Salesforce', 2086 | 'Bloomberg', 2087 | ], 2088 | }, 2089 | { 2090 | id: 157, 2091 | name: 'Trapping Rain Water', 2092 | url: 'https://leetcode.com/problems/trapping-rain-water/', 2093 | pattern: ['Two Pointers'], 2094 | difficulty: 'Hard', 2095 | premium: false, 2096 | companies: [ 2097 | 'Facebook', 2098 | 'Amazon', 2099 | 'Goldman Sachs', 2100 | 'Microsoft', 2101 | 'Adobe', 2102 | 'Google', 2103 | 'Bloomberg', 2104 | 'Qualtrics', 2105 | 'Snapchat', 2106 | 'Lyft', 2107 | 'Uber', 2108 | 'Apple', 2109 | 'Citadel', 2110 | 'Tesla', 2111 | ], 2112 | }, 2113 | { 2114 | id: 158, 2115 | name: 'Container With Most Water', 2116 | url: 'https://leetcode.com/problems/container-with-most-water/', 2117 | pattern: ['Two Pointers'], 2118 | difficulty: 'Medium', 2119 | premium: false, 2120 | companies: [ 2121 | 'Amazon', 2122 | 'Microsoft', 2123 | 'Google', 2124 | 'Adobe', 2125 | 'Bloomberg', 2126 | 'Apple', 2127 | 'Uber', 2128 | 'Facebook', 2129 | ], 2130 | }, 2131 | { 2132 | id: 159, 2133 | name: 'Longest Word in Dictionary', 2134 | url: 'https://leetcode.com/problems/longest-word-in-dictionary/', 2135 | pattern: ['Trie'], 2136 | difficulty: 'Medium', 2137 | premium: false, 2138 | companies: ['Google'], 2139 | }, 2140 | { 2141 | id: 160, 2142 | name: 'Index Pairs of a String', 2143 | url: 'https://leetcode.com/problems/index-pairs-of-a-string/', 2144 | pattern: ['Trie'], 2145 | difficulty: 'Easy', 2146 | premium: true, 2147 | companies: ['Amazon'], 2148 | }, 2149 | { 2150 | id: 161, 2151 | name: 'Maximum XOR of Two Numbers in an Array', 2152 | url: 'https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array', 2153 | pattern: ['Trie'], 2154 | difficulty: 'Medium', 2155 | premium: false, 2156 | companies: ['Adobe'], 2157 | }, 2158 | { 2159 | id: 162, 2160 | name: 'Concatenated Words', 2161 | url: 'https://leetcode.com/problems/concatenated-words/', 2162 | pattern: ['Trie'], 2163 | difficulty: 'Hard', 2164 | premium: false, 2165 | companies: ['Amazon', 'Microsoft'], 2166 | }, 2167 | { 2168 | id: 163, 2169 | name: 'Prefix and Suffix Search', 2170 | url: 'https://leetcode.com/problems/prefix-and-suffix-search/', 2171 | pattern: ['Trie'], 2172 | difficulty: 'Hard', 2173 | premium: false, 2174 | companies: ['Google'], 2175 | }, 2176 | { 2177 | id: 164, 2178 | name: 'Palindrome Pairs', 2179 | url: 'https://leetcode.com/problems/palindrome-pairs/', 2180 | pattern: ['Trie'], 2181 | difficulty: 'Hard', 2182 | premium: false, 2183 | companies: ['Airbnb', 'Facebook', 'Google'], 2184 | }, 2185 | { 2186 | id: 165, 2187 | name: 'Design Search Autocomplete System', 2188 | url: 'https://leetcode.com/problems/design-search-autocomplete-system/', 2189 | pattern: ['Trie'], 2190 | difficulty: 'Hard', 2191 | premium: true, 2192 | companies: [ 2193 | 'Amazon', 2194 | 'Google', 2195 | 'Microsoft', 2196 | 'Uber', 2197 | 'Bloomberg', 2198 | 'Twitter', 2199 | ], 2200 | }, 2201 | { 2202 | id: 166, 2203 | name: 'Word Squares', 2204 | url: 'https://leetcode.com/problems/word-squares/', 2205 | pattern: ['Trie'], 2206 | difficulty: 'Hard', 2207 | premium: true, 2208 | companies: ['Bloomberg', 'Oracle', 'Google'], 2209 | }, 2210 | { 2211 | id: 167, 2212 | name: 'Sort Items by Groups Respecting Dependencies', 2213 | url: 2214 | 'https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies/', 2215 | pattern: ['DFS', 'Graph', 'Topological Sort'], 2216 | difficulty: 'Hard', 2217 | premium: false, 2218 | companies: ['Apple'], 2219 | }, 2220 | { 2221 | id: 168, 2222 | name: 'Median of Two Sorted Arrays', 2223 | url: 'https://leetcode.com/problems/median-of-two-sorted-arrays/', 2224 | pattern: ['Binary Search'], 2225 | difficulty: 'Hard', 2226 | premium: false, 2227 | companies: [ 2228 | 'Amazon', 2229 | 'Goldman Sachs', 2230 | 'Microsoft', 2231 | 'Google', 2232 | 'Adobe', 2233 | 'Facebook', 2234 | 'Apple', 2235 | 'Bloomberg', 2236 | 'Oracle', 2237 | ], 2238 | }, 2239 | { 2240 | id: 169, 2241 | name: 'Majority Element', 2242 | url: 'https://leetcode.com/problems/majority-element/', 2243 | pattern: ['Sorting'], 2244 | difficulty: 'Easy', 2245 | premium: false, 2246 | companies: ['Amazon', 'Facebook', 'Apple', 'Microsoft', 'Adobe'], 2247 | }, 2248 | { 2249 | id: 170, 2250 | name: 'Convert 1D Array Into 2D Array', 2251 | url: 'https://leetcode.com/problems/convert-1d-array-into-2d-array/', 2252 | pattern: ['Arrays'], 2253 | difficulty: 'Easy', 2254 | premium: false, 2255 | companies: ['Google'], 2256 | }, 2257 | ]; 2258 | 2259 | const sortBy = { Easy: 0, Medium: 1, Hard: 2 }; 2260 | 2261 | export default questions.sort( 2262 | (a, b) => sortBy[a.difficulty] - sortBy[b.difficulty], 2263 | ); 2264 | --------------------------------------------------------------------------------
416 |
417 | {column.render('Header')} 418 | {/* eslint-disable-next-line no-nested-ternary */} 419 | {column.isSorted 420 | ? column.isSortedDesc 421 | ? ' 🔽' 422 | : ' 🔼' 423 | : ''} 424 |
425 |
{column.canFilter ? column.render('Filter') : null}
426 |
{cell.render('Cell')}