Skip to content

leetcode-2025-02-17#1

Open
max-zaitsev wants to merge 1 commit intomainfrom
2025-02-17
Open

leetcode-2025-02-17#1
max-zaitsev wants to merge 1 commit intomainfrom
2025-02-17

Conversation

@max-zaitsev
Copy link
Copy Markdown
Owner

Добавил задачи с литкода и поменял структуру папок. Смотреть только на /leetcode

* @return {null|boolean|number|string|Array|Object}
*/
Array.prototype.last = function () {
return this.length === 0 ? -1 : this.at(-1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.at главное чтоб поддерживался ))

*/
set(key: number, value: number, duration: number): boolean {
const currentTime = new Date().getTime();
let oldNotExpired = false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всегда когда вижу let, начит проблема с функциональностью кода.

Мои изменения cache - сменить на Мапу

Добавить метод, для удаления истекших ключей

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants