Следующая задача: https://leetcode.com/problems/lemonade-change/. Она будет разобрана в 08.01.2020 в 21:00 MSK
Теги предыдущей задачи: связные списки,O(size(l1)+size(l2)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=JHRG307G0UQ
Теги предыдущей задачи: связные списки,O(size(l1)+size(l2)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=JHRG307G0UQ
LeetCode
Lemonade Change - LeetCode
Can you solve this real interview question? Lemonade Change - At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you and order one at a time (in the order specified by bills). Each customer will only buy one lemonade…
LeetCode Problems pinned «Следующая задача: https://leetcode.com/problems/lemonade-change/. Она будет разобрана в 08.01.2020 в 21:00 MSK Теги предыдущей задачи: связные списки,O(size(l1)+size(l2)) по времени,O(1) по памяти Разбор предыдущей задачи: https://www.youtube.com/watch?v=JHRG307G0UQ»
Следующая задача: https://leetcode.com/problems/construct-string-from-binary-tree/. Она будет разобрана в 10.01.2020 в 21:00 MSK
Теги предыдущей задачи: жадный алгоритм,O(size(bills)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=mS6VBH2ulYc
Теги предыдущей задачи: жадный алгоритм,O(size(bills)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=mS6VBH2ulYc
LeetCode
Construct String from Binary Tree - LeetCode
Can you solve this real interview question? Construct String from Binary Tree - Given the root node of a binary tree, your task is to create a string representation of the tree following a specific set of formatting rules. The representation should be based…
Следующая задача: https://leetcode.com/problems/detect-capital/. Она будет разобрана в 12.01.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,рекурсивная реализация,нерекурсивная реализация,vector,list,stack
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ZBu9Y7-NwvI
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,рекурсивная реализация,нерекурсивная реализация,vector,list,stack
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ZBu9Y7-NwvI
LeetCode
Detect Capital - LeetCode
Can you solve this real interview question? Detect Capital - We define the usage of capitals in a word to be right when one of the following cases holds:
* All letters in this word are capitals, like "USA".
* All letters in this word are not capitals,…
* All letters in this word are capitals, like "USA".
* All letters in this word are not capitals,…
Следующая задача: https://leetcode.com/problems/excel-sheet-column-number/. Она будет разобрана в 14.01.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|word|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=2KLxYS10Y1g
Теги предыдущей задачи: обработка строк,O(|word|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=2KLxYS10Y1g
LeetCode
Excel Sheet Column Number - LeetCode
Can you solve this real interview question? Excel Sheet Column Number - Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding column number.
For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA …
For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA …
Следующая задача: https://leetcode.com/problems/two-sum-iv-input-is-a-bst/. Она будет разобрана в 16.01.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,системы счисления,O(|s|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=mDd4FlRXzQo
Теги предыдущей задачи: обработка строк,системы счисления,O(|s|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=mDd4FlRXzQo
LeetCode
Two Sum IV - Input is a BST - LeetCode
Can you solve this real interview question? Two Sum IV - Input is a BST - Given the root of a binary search tree and an integer k, return true if there exist two elements in the BST such that their sum is equal to k, or false otherwise.
Example 1:
[…
Example 1:
[…
Следующая задача: https://leetcode.com/problems/roman-to-integer/. Она будет разобрана в 18.01.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,O(height) по памяти,итератор по двоичному дереву,leetcode 1,leetcode 167
Разбор предыдущей задачи: https://www.youtube.com/watch?v=e3tovJY8AiI
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,O(height) по памяти,итератор по двоичному дереву,leetcode 1,leetcode 167
Разбор предыдущей задачи: https://www.youtube.com/watch?v=e3tovJY8AiI
LeetCode
Roman to Integer - LeetCode
Can you solve this real interview question? Roman to Integer - Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D …
Symbol Value
I 1
V 5
X 10
L 50
C 100
D …
Следующая задача: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/. Она будет разобрана в 20.01.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|s|) по времени,O(1) по памяти,римские числа
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ucCArP5ZJtg
Теги предыдущей задачи: обработка строк,O(|s|) по времени,O(1) по памяти,римские числа
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ucCArP5ZJtg
LeetCode
Convert Sorted Array to Binary Search Tree - LeetCode
Can you solve this real interview question? Convert Sorted Array to Binary Search Tree - Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree.
Example 1:
[https://assets.lee…
Example 1:
[https://assets.lee…
Следующая задача: https://leetcode.com/problems/valid-anagram/. Она будет разобрана в 22.01.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,O(logn) стек
Разбор предыдущей задачи: https://www.youtube.com/watch?v=kwvdyTNC6IQ
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти,O(logn) стек
Разбор предыдущей задачи: https://www.youtube.com/watch?v=kwvdyTNC6IQ
LeetCode
Valid Anagram - LeetCode
Can you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise.
Example 1:
Input: s = "anagram", t = "nagaram"
Output: true
Example 2:
Input: s = "rat", t = "car"
Output:…
Example 1:
Input: s = "anagram", t = "nagaram"
Output: true
Example 2:
Input: s = "rat", t = "car"
Output:…
Следующая задача: 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: Решить задачу за один проход