This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "build": "npm run clean && npm run compile", | |
| "compile": "NODE_ENV=production webpack --config ./webpack.config.js --progress", | |
| "clean": "rm -rf ./build/bundle*.js", | |
| "sass-compile": "node-sass dist/scss -o dist/css", | |
| "webpack": "webpack-dev-server --config ./webpack.dev.config.js --watch --open", | |
| "start": "yarn run sass-compile && concurrently --kill-others \"yarn run sass-compile --watch\" \"yarn run webpack\"", | |
| "test": "eslint **/*.js" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 🎯 Complete Coding Interview Patterns - Easy to Follow Version | |
| ## 🔥 ALL PATTERNS WITH SIMPLIFIED PROBLEMS & CODE | |
| ### 1️⃣ **TWO POINTERS PATTERN** | |
| ```javascript | |
| // Time: O(n), Space: O(1) | |
| function twoSumSorted(arr, target) { | |
| let left = 0, right = arr.length - 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 1️⃣ **TWO POINTERS** | |
| **1. Two Sum II (Sorted Array)** | |
| - **Pattern:** Two Pointers (Opposite Ends) | |
| - **Core Logic:** | |
| ```javascript | |
| let left = 0, right = arr.length - 1; | |
| while (left < right) { | |
| const sum = arr[left] + arr[right]; | |
| if (sum === target) return [left, right]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const capitalOneSolutions = { | |
| easy: [ | |
| { | |
| name: "Best Time to Buy and Sell Stock", | |
| companies: 110, | |
| timeComplexity: "O(n)", | |
| spaceComplexity: "O(1)", | |
| topics: ["Array", "Dynamic Programming"], | |
| solution: ` | |
| function maxProfit(prices) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # **Algorithmic Solutions for Technical Interviews** | |
| ## A Comprehensive Guide to Capital One Programming Problems | |
| --- | |
| ## **Chapter 1: Array and Dynamic Programming** | |
| ### **1.1 Best Time to Buy and Sell Stock** | |
| **Problem:** Given an array of prices where prices[i] represents the stock price on day i, find the maximum profit from a single buy-sell transaction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # **Algorithmic Problem Solving: A Comprehensive JavaScript Guide** | |
| ## **Table of Contents** | |
| --- | |
| ## **Chapter 1: Fundamental Array Algorithms** | |
| ### **1.1 The Two Sum Problem** | |
| **Problem Statement:** Given an array of integers and a target sum, find two numbers that add up to the target. |
OlderNewer