Skip to content

Instantly share code, notes, and snippets.

View wingtonrbrito's full-sized avatar

Wington Brito wingtonrbrito

View GitHub Profile
@wingtonrbrito
wingtonrbrito / package.json
Created July 26, 2018 01:32
script example to run webpack on prod and dev
"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"
},
# 🎯 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;
@wingtonrbrito
wingtonrbrito / core-interview-review.js
Last active September 9, 2025 11:27
Core problem snippets
## 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];
@wingtonrbrito
wingtonrbrito / 48Cp.js
Created September 15, 2025 18:02
48C1
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) {
@wingtonrbrito
wingtonrbrito / gist:2eed7d68e62298c780a65c1534c1d216
Created September 15, 2025 18:22
Latest c1questions end date September 2025
# **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.
@wingtonrbrito
wingtonrbrito / fbtop100.js
Created September 16, 2025 18:53
FB top 100
# **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.