Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/CODEOWNERS

This file was deleted.

3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@

Before submitting, please ensure:
- [ ] Code compiles without errors
- [ ] All tests pass
- [ ] Code follows the existing style guide
- [ ] No console.log statements in strategy
- [ ] Time and space complexity updated in PR
- [ ] Edge cases are handled

**Thank you**
**Stay Locked In!**
65 changes: 0 additions & 65 deletions .github/workflows/pr-review-assignment.yml

This file was deleted.

9 changes: 0 additions & 9 deletions Memory/education.json

This file was deleted.

557 changes: 0 additions & 557 deletions Memory/experience.json

This file was deleted.

29 changes: 0 additions & 29 deletions Memory/goal.json

This file was deleted.

16 changes: 0 additions & 16 deletions Memory/index.json

This file was deleted.

8 changes: 0 additions & 8 deletions Memory/personal.json

This file was deleted.

125 changes: 0 additions & 125 deletions Memory/problemSolving.json

This file was deleted.

29 changes: 0 additions & 29 deletions Memory/projects.json

This file was deleted.

28 changes: 0 additions & 28 deletions Memory/rules.json

This file was deleted.

5 changes: 0 additions & 5 deletions Memory/skils.json

This file was deleted.

4 changes: 4 additions & 0 deletions dist/leetCodeStyle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const hillsAndValleysCount_1 = require("./pointers/hillsAndValleysCount");
const maxProductSubarry_1 = require("./pointers/maxProductSubarry");
const rotatedArraySearch_1 = require("./search/rotatedArraySearch");
const zeroFilledSubArrlength_1 = require("./arrayManipulation/zeroFilledSubArrlength");
const longestCommonPrefix_1 = require("./slidingWindow/longestCommonPrefix");
// TwoSum1: No pair adds to 100
const twoSum1 = new twoSum1_1.TwoSumStrategy1();
(0, problemSolvingExec_1.exec)(twoSum1, { nums: [1, 2, 3, 4, 5], target: 100 }); // ➞ [-1,-1]
Expand Down Expand Up @@ -77,3 +78,6 @@ const rotatedArraySearch = new rotatedArraySearch_1.RotatedArraySearchStrategy()
//ZeroFilledSubArray: Expected 6 as output
const zeroFilledSubArray = new zeroFilledSubArrlength_1.zeroFilledSubArrayStrategy();
(0, problemSolvingExec_1.exec)(zeroFilledSubArray, { nums: [1, 3, 0, 0, 2, 0, 0, 4] });
//LongestCommonPrefix: Expected "" as output
const longestCommonPrefix = new longestCommonPrefix_1.LongestCommonPrefixStrategy();
(0, problemSolvingExec_1.exec)(longestCommonPrefix, { array: ["hello", "", "world", "help"] });
21 changes: 21 additions & 0 deletions dist/leetCodeStyle/slidingWindow/longestCommonPrefix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LongestCommonPrefixStrategy = void 0;
class LongestCommonPrefixStrategy {
contextFunction(params) {
const { array } = params;
if (!array.length)
return "";
const sortedLen = array.sort((a, b) => b.length - a.length);
let currentWin = sortedLen[0];
for (let i = 1; i < sortedLen.length; i++) {
while (!sortedLen[i].startsWith(currentWin)) {
currentWin = currentWin.slice(0, -1);
if (currentWin == "")
return "";
}
}
return currentWin;
}
}
exports.LongestCommonPrefixStrategy = LongestCommonPrefixStrategy;
1 change: 0 additions & 1 deletion dist/leetCodeStyle/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
"use strict";
// Parameter interfaces for all strategy classes
Object.defineProperty(exports, "__esModule", { value: true });
Loading