Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
161f949
Remove outdated tasks and code implementations from days 6 to 9, incl…
ehpc Jul 29, 2025
0377fc6
Remove outdated task descriptions for days 4 to 14 and add new tasks …
ehpc Jul 29, 2025
5523444
Update task descriptions for days 1 to 14, adding numbering and clari…
ehpc Jul 29, 2025
6b6e712
Add initial task files for days 1 to 14
ehpc Jul 29, 2025
cc8a593
Add class Foo with methods demonstrating 'this' behavior in functions…
ehpc Jul 29, 2025
45e1fd7
Initialize project with TypeScript configuration, package.json, and .…
ehpc Jul 30, 2025
aa046f7
Update day 1 tasks: correct format function example and add detailed …
ehpc Aug 2, 2025
da672f3
Implement allSettled function to handle multiple promises and return …
ehpc Aug 2, 2025
175e1df
Add implementations for any and race functions, and update allSettled…
ehpc Aug 2, 2025
4ea10f8
Add example demonstrating promise chaining and closure issue with var
ehpc Aug 2, 2025
45b3a49
Update day 2 tasks: correct console output for setByPath and maxDepth…
ehpc Aug 3, 2025
5661a36
Add event loop behavior example and explanations in day_3_1.ts
ehpc Aug 3, 2025
01927d4
Implement mySetImmediate and myClearImmediate functions for microtask…
ehpc Aug 4, 2025
25571bb
Implement zip and generatorZip functions for iterable zipping
ehpc Aug 4, 2025
25edbfa
Implement promisify function and callback division example
ehpc Aug 5, 2025
89bbc9f
Update sorting function and enhance string search implementation
ehpc Aug 6, 2025
6eb729b
Implement debounce and throttle functions for function rate limiting
ehpc Aug 6, 2025
0233471
Implement EventEmitter class with on, once, off, and emit methods for…
ehpc Aug 6, 2025
133ef16
Implement flat and flatNonRecursive functions for array flattening
ehpc Aug 7, 2025
2a0ecf1
Implement topological sorting function for dependency resolution
ehpc Aug 7, 2025
08a8068
Implement User and UserBuilder classes for user creation and management
ehpc Aug 8, 2025
153d7ed
Implement breadth-first search (BFS) function for tree traversal
ehpc Aug 8, 2025
666237e
Implement dasherize and dasherizeStepByStep functions for string form…
ehpc Aug 8, 2025
7f0239d
Implement waterfall function for asynchronous control flow
ehpc Aug 8, 2025
ff3e45f
Implement functions for array difference, async semaphore, object ser…
ehpc Aug 9, 2025
38c895e
Implement throttle function to limit the execution rate of a given fu…
ehpc Aug 10, 2025
4063e43
Implement deep comparison function for objects and arrays
ehpc Aug 10, 2025
f715e84
Implement function to filter unique strings from an array
ehpc Aug 10, 2025
91a391a
Implement queue data structure with push and pop methods
ehpc Aug 10, 2025
a56ca5b
Implement binary search function with comparator
ehpc Aug 10, 2025
d349c0d
Implement retry function with customizable options for retries and de…
ehpc Aug 11, 2025
c828158
Implement LRU Cache with set, get, and has methods
ehpc Aug 11, 2025
e54acc2
Implement function to collapse consecutive duplicate characters in a …
ehpc Aug 11, 2025
f8b657c
Implement function to reduce an array of numbers into ranges
ehpc Aug 11, 2025
2ff4aff
Implement allSettledLimit function to execute promises with a concurr…
ehpc Aug 11, 2025
4fca4d4
Implement myParseFloat function to parse a string into a floating-poi…
ehpc Aug 11, 2025
acfa4e1
Implement getCentury function to calculate the century from a given year
ehpc Aug 11, 2025
9785730
Implement functions to convert string ranges to arrays and find inter…
ehpc Aug 12, 2025
5be0f07
Implement twoSum function to find indices of two numbers that add up …
ehpc Aug 12, 2025
52bd11b
Implement stream and streamGen functions using EventEmitter for async…
ehpc Aug 12, 2025
71561f1
Implement isPalindrome function to check if a string is a palindrome
ehpc Aug 12, 2025
3c154f9
Implement extractQuotes function to extract quoted substrings from a …
ehpc Aug 13, 2025
f1d87d6
Implement zip function for async iteration over multiple AsyncIterables
ehpc Aug 13, 2025
86073d1
Implement Levenshtein distance functions with recursive, memoized, an…
ehpc Aug 15, 2025
d68b469
Implement brute force and Knuth-Morris-Pratt substring search algorithms
ehpc Aug 15, 2025
309c6a8
Implement binary search algorithm to find the first bad commit in an …
ehpc Aug 15, 2025
beaa61a
Implement maxUniqueSubstr function to find the longest substring with…
ehpc Aug 15, 2025
e4ce445
Implement functions to generate anagrams and anagrams with frequency …
ehpc Aug 16, 2025
a83ba15
Implement collapse function to flatten nested objects and arrays
ehpc Aug 16, 2025
9a00292
Implement functions to find palindromic substrings using two approaches
ehpc Aug 17, 2025
6de6470
Implement OrderedQueue class with push and pop methods for max heap f…
ehpc Aug 17, 2025
00e24e7
Add VS Code configuration files for debugging and settings
ehpc Aug 17, 2025
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
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Node modules
node_modules/

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Build output
dist/
build/
out/
*.tsbuildinfo

# Environment variables
.env
.env.*

# OS files
.DS_Store
5 changes: 0 additions & 5 deletions .idea/.gitignore

This file was deleted.

13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug Active TypeScript File",
"program": "${file}",
"runtimeArgs": ["-r", "ts-node/register"],
"skipFiles": ["<node_internals>/**"]
}
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"github.copilot.enable": {
"javascript": false,
"typescript": false
}
}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# code_interview_prep

## Days

- [Day 1](day_1/day_1.md)
- [Day 2](day_2/day_2.md)
- [Day 3](day_3/day_3.md)
- [Day 4](day_4/day_4.md)
- [Day 5](day_5/day_5.md)
- [Day 6](day_6/day_6.md)
- [Day 7](day_7/day_7.md)
- [Day 8](day_8/day_8.md)
- [Day 9](day_9/day_9.md)
- [Day 10](day_10/day_10.md)
- [Day 11](day_11/day_11.md)
- [Day 12](day_12/day_12.md)
- [Day 13](day_13/day_13.md)
- [Day 14](day_14/day_14.md)
105 changes: 0 additions & 105 deletions day_1/1_solution.js

This file was deleted.

129 changes: 0 additions & 129 deletions day_1/2.js

This file was deleted.

29 changes: 24 additions & 5 deletions day_1/Задачи (1).md → day_1/day_1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# День 1

## Что выведется в консоль?
## 1. Что выведется в консоль?

И почему?

Expand All @@ -17,7 +17,7 @@ new Foo().bla(); // ?
new Foo().baz(); // ?
```

## Реализация Partial классов
## 2. Реализация Partial классов

Необходимо написать функцию, которая бы позволяла расширять заданный класс новыми методами. В добавляемых методах должен корректно работать super.

Expand Down Expand Up @@ -50,15 +50,15 @@ console.log(example.bar); // Случайное число
console.log(example.bar); // Случайное число
```

## Шаблонизатор строки с поддержкой выражений
## 3. Шаблонизатор строки с поддержкой выражений

Необходимо создать функцию, которая бы принимала шаблон и объект с данными, а возвращала бы конечную строку.

```js
format('Hello ${name}! May age is ${age * day_2}.', {name: 'Bob', age: 12}); // 'Hello Bob! My age is 24.'
format('Hello ${name}! My age is ${age * 12}.', {name: 'Bob', age: 2}); // 'Hello Bob! My age is 24.'
```

## Реализация функции аналогичной Promise.allSettled
## 4. Реализация функции аналогичной Promise.allSettled

Необходимо написать функцию, которая бы повторяло поведение Promise.allSettled.

Expand All @@ -69,3 +69,22 @@ allSettled([1, Promise.resolve(2), Promise.reject(3)]).then(([v1, v2, v3]) => {
console.log(v3); // {status: 'rejected', reason: 3}
});
```

## 5. Реализация функции аналогичной Promise.any

```js
any([Promise.reject(1), Promise.resolve(2), 3]).then((res) => {
console.log(res); // 2
});
```

## 6. Реализация функции аналогичной Promise.race

```js
race([Promise.resolve(2), 3]).then((res) => {
console.log(res); // 2
});
race([Promise.reject(1), Promise.resolve(2), 3]).catch((reason) => {
console.log(reason); // 1
});
```
Loading