Следующая задача: https://leetcode.com/problems/verifying-an-alien-dictionary/. Она будет разобрана в 24.01.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|alphabet|+|s|+|t|) по времени,O(|alphabet|) по памяти,unicode,utf-8
Разбор предыдущей задачи: https://www.youtube.com/watch?v=wNuRONENMe4
Теги предыдущей задачи: обработка строк,O(|alphabet|+|s|+|t|) по времени,O(|alphabet|) по памяти,unicode,utf-8
Разбор предыдущей задачи: https://www.youtube.com/watch?v=wNuRONENMe4
LeetCode
Verifying an Alien Dictionary - LeetCode
Can you solve this real interview question? Verifying an Alien Dictionary - In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.…
Следующая задача: https://leetcode.com/problems/delete-node-in-a-linked-list/. Она будет разобрана в 26.01.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,лексикографический порядок,O(|alphabet|+wordsSizeSum) по времени,O(|alphabet|) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VvEujIgV-D0
Теги предыдущей задачи: обработка строк,лексикографический порядок,O(|alphabet|+wordsSizeSum) по времени,O(|alphabet|) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VvEujIgV-D0
LeetCode
Delete Node in a Linked List - LeetCode
Can you solve this real interview question? Delete Node in a Linked List - There is a singly-linked list head and we want to delete a node node in it.
You are given the node to be deleted node. You will not be given access to the first node of head.
All…
You are given the node to be deleted node. You will not be given access to the first node of head.
All…
Следующая задача: https://leetcode.com/problems/reverse-linked-list/. Она будет разобрана в 28.01.2020 в 21:00 MSK
Теги предыдущей задачи: связные списки,O(1) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=fvbWCjgl4K0
Теги предыдущей задачи: связные списки,O(1) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=fvbWCjgl4K0
LeetCode
Reverse Linked List - LeetCode
Can you solve this real interview question? Reverse Linked List - Given the head of a singly linked list, reverse the list, and return the reversed list.
Example 1:
[https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg]
Input: head = [1,2,3,4…
Example 1:
[https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg]
Input: head = [1,2,3,4…
Следующая задача: https://leetcode.com/problems/reshape-the-matrix/. Она будет разобрана в 30.01.2020 в 21:00 MSK
Теги предыдущей задачи: связные списки,нерекурсивная реализация,O(n) по времени,O(1) по памяти,рекурсивная реализация,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=jqZPEfAbc2s
Теги предыдущей задачи: связные списки,нерекурсивная реализация,O(n) по времени,O(1) по памяти,рекурсивная реализация,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=jqZPEfAbc2s
LeetCode
Reshape the Matrix - LeetCode
Can you solve this real interview question? Reshape the Matrix - In MATLAB, there is a handy function called reshape which can reshape an m x n matrix into a new one with a different size r x c keeping its original data.
You are given an m x n matrix mat…
You are given an m x n matrix mat…
Следующая задача: https://leetcode.com/problems/average-of-levels-in-binary-tree/. Она будет разобрана в 01.02.2020 в 21:00 MSK
Теги предыдущей задачи: двумерные массивы,O(r*c)
Разбор предыдущей задачи: https://www.youtube.com/watch?v=j1jfSE3y1ao
Теги предыдущей задачи: двумерные массивы,O(r*c)
Разбор предыдущей задачи: https://www.youtube.com/watch?v=j1jfSE3y1ao
LeetCode
Average of Levels in Binary Tree - LeetCode
Can you solve this real interview question? Average of Levels in Binary Tree - Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. Answers within 10-5 of the actual answer will be accepted.
Example…
Example…
Следующая задача: https://leetcode.com/problems/letter-case-permutation/. Она будет разобрана в 03.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=GfnUcjRn9D8
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=GfnUcjRn9D8
LeetCode
Letter Case Permutation - LeetCode
Can you solve this real interview question? Letter Case Permutation - Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string.
Return a list of all possible strings we could create. Return the output…
Return a list of all possible strings we could create. Return the output…
Следующая задача: https://leetcode.com/problems/invert-binary-tree/. Она будет разобрана в 05.02.2020 в 21:00 MSK
Теги предыдущей задачи: перебор 2^n,рекурсивный вариант,нерекурсивный вариант,O(len*2^len) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=YAnkwDou5Uo
Теги предыдущей задачи: перебор 2^n,рекурсивный вариант,нерекурсивный вариант,O(len*2^len) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=YAnkwDou5Uo
LeetCode
Invert Binary Tree - LeetCode
Can you solve this real interview question? Invert Binary Tree - Given the root of a binary tree, invert the tree, and return its root.
Example 1:
[https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg]
Input: root = [4,2,7,1,3,6,9]
Output:…
Example 1:
[https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg]
Input: root = [4,2,7,1,3,6,9]
Output:…
Следующая задача: https://leetcode.com/problems/island-perimeter/. Она будет разобрана в 07.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ny_bx6bsSgo
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ny_bx6bsSgo
LeetCode
Island Perimeter - LeetCode
Can you solve this real interview question? Island Perimeter - You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water.
Grid cells are connected horizontally/vertically (not diagonally). The…
Grid cells are connected horizontally/vertically (not diagonally). The…
Следующая задача: https://leetcode.com/problems/maximum-depth-of-binary-tree/. Она будет разобрана в 09.02.2020 в 21:00 MSK
Теги предыдущей задачи: двумерные массивы,O(sizeI*sizeJ) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=0ViPVp-CETs
Теги предыдущей задачи: двумерные массивы,O(sizeI*sizeJ) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=0ViPVp-CETs
LeetCode
Maximum Depth of Binary Tree - LeetCode
Can you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
Следующая задача: https://leetcode.com/problems/middle-of-the-linked-list/. Она будет разобрана в 11.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ELOXBdKsdbo
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ELOXBdKsdbo
LeetCode
Middle of the Linked List - LeetCode
Can you solve this real interview question? Middle of the Linked List - Given the head of a singly linked list, return the middle node of the linked list.
If there are two middle nodes, return the second middle node.
Example 1:
[https://assets.leet…
If there are two middle nodes, return the second middle node.
Example 1:
[https://assets.leet…
LeetCode Problems
Следующая задача: https://leetcode.com/problems/middle-of-the-linked-list/. Она будет разобрана в 11.02.2020 в 21:00 MSK Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация Разбор предыдущей…
Follow up: Решить задачу за один проход
Следующая задача: https://leetcode.com/problems/univalued-binary-tree/. Она будет разобрана в 15.02.2020 в 21:00 MSK
Теги предыдущей задачи: связные списки,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=-zxHtb9cN1U
Теги предыдущей задачи: связные списки,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=-zxHtb9cN1U
LeetCode
Univalued Binary Tree - LeetCode
Can you solve this real interview question? Univalued Binary Tree - A binary tree is uni-valued if every node in the tree has the same value.
Given the root of a binary tree, return true if the given tree is uni-valued, or false otherwise.
Example 1:…
Given the root of a binary tree, return true if the given tree is uni-valued, or false otherwise.
Example 1:…
LeetCode Problems
Следующая задача: https://leetcode.com/problems/univalued-binary-tree/. Она будет разобрана в 15.02.2020 в 21:00 MSK Теги предыдущей задачи: связные списки,O(n) по времени,O(1) по памяти Разбор предыдущей задачи: https://www.youtube.com/watch?v=-zxHtb9cN1U
Follow up: Решить без дополнительного памяти
Следующая задача: https://leetcode.com/problems/reverse-words-in-a-string-iii/. Она будет разобрана в 17.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=c4Y2vayEvpw
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=c4Y2vayEvpw
LeetCode
Reverse Words in a String III - LeetCode
Can you solve this real interview question? Reverse Words in a String III - Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.
Example 1:
Input: s = "Let's take…
Example 1:
Input: s = "Let's take…
Следующая задача: https://leetcode.com/problems/search-in-a-binary-search-tree/. Она будет разобрана в 21.02.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|s|) по времени,O(1) по памяти,utf-8
Разбор предыдущей задачи: https://www.youtube.com/watch?v=1IYt44WYzkM
Теги предыдущей задачи: обработка строк,O(|s|) по времени,O(1) по памяти,utf-8
Разбор предыдущей задачи: https://www.youtube.com/watch?v=1IYt44WYzkM
LeetCode
Search in a Binary Search Tree - LeetCode
Can you solve this real interview question? Search in a Binary Search Tree - You are given the root of a binary search tree (BST) and an integer val.
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
Следующая задача: https://leetcode.com/problems/merge-two-binary-trees/. Она будет разобрана в 25.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(height) по времени,O(1) по памяти,нерекурсивная реализация,рекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=g38t_KAGTNs
Теги предыдущей задачи: деревья,O(height) по времени,O(1) по памяти,нерекурсивная реализация,рекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=g38t_KAGTNs
LeetCode
Merge Two Binary Trees - LeetCode
Can you solve this real interview question? Merge Two Binary Trees - You are given two binary trees root1 and root2.
Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to…
Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to…
Следующая задача: https://leetcode.com/problems/range-sum-of-bst/. Она будет разобрана в 29.02.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(min(count(t1),count(t2))) по времени,O(min(height(t1),height(t2))) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=rl4wCL07VRs
Теги предыдущей задачи: деревья,O(min(count(t1),count(t2))) по времени,O(min(height(t1),height(t2))) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=rl4wCL07VRs
LeetCode
Range Sum of BST - LeetCode
Can you solve this real interview question? Range Sum of BST - Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high].
Example 1:
[https://asse…
Example 1:
[https://asse…
Следующая задача: https://leetcode.com/problems/trim-a-binary-search-tree/. Она будет разобрана в 02.03.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,оптимизация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=MLza2syA_lE
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти,оптимизация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=MLza2syA_lE
LeetCode
Trim a Binary Search Tree - LeetCode
Can you solve this real interview question? Trim a Binary Search Tree - Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [low, high]. Trimming the tree should not…
Следующая задача: https://leetcode.com/problems/hamming-distance/. Она будет разобрана в 04.03.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(height) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=fbirDwtFsg8
Теги предыдущей задачи: деревья,O(height) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=fbirDwtFsg8
LeetCode
Hamming Distance - LeetCode
Can you solve this real interview question? Hamming Distance - The Hamming distance [https://en.wikipedia.org/wiki/Hamming_distance] between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y…
Given two integers x and y…
Следующая задача: https://leetcode.com/problems/counting-bits/. Она будет разобрана в 10.03.2020 в 21:00 MSK
Теги предыдущей задачи: битовые операции,xor,leetcode 191,O(1) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=11b_SJSX2sM
Теги предыдущей задачи: битовые операции,xor,leetcode 191,O(1) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=11b_SJSX2sM
LeetCode
Counting Bits - LeetCode
Can you solve this real interview question? Counting Bits - Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.
Do not solve it with built-in functions…
Do not solve it with built-in functions…
Доброе утро! С вами Фёдор Меньшиков, и я провожу эксперимент. Я набираю группу из 5 человек для прокачки навыков решения задач интервью с leetcode. В комплекте: взаимные ревью участниками группы и ревью мной. В итоге Вы получаете уверенность, что решили задачу оптимально, а также получаете опыт code review решений коллег. Поскольку группа экспериментальная, то она набирается одна, и число мест ограничено. Также могут быть ограничения по используемым языкам программирования (участники группы должны понимать решения друг друга) и по уровню участников (им должно быть интересно решать примерно одинаковый набор задач). Стоимость участия - 10 тысяч рублей в месяц. Заявки принимаются до 12 марта включительно. За подробностями обращайтесь ко мне в личные сообщения Телеграм @FyodorMenshikov или на почту mfv@mail.ru