Следующая задача: https://leetcode.com/problems/min-cost-climbing-stairs/. Она будет разобрана в 15.12.2019 в 21:00 MSK
Теги предыдущей задачи: жадный алгоритм,acmp 278,проверка подпоследовательности,O(|t|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=J8ii90nFNKQ
Теги предыдущей задачи: жадный алгоритм,acmp 278,проверка подпоследовательности,O(|t|) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=J8ii90nFNKQ
LeetCode
Min Cost Climbing Stairs - LeetCode
Can you solve this real interview question? Min Cost Climbing Stairs - You are given an integer array cost where cost[i] is the cost of ith step on a staircase.
Once you pay the cost, you can either climb one or two steps.
You can either start from the…
Once you pay the cost, you can either climb one or two steps.
You can either start from the…
Следующая задача: https://leetcode.com/problems/assign-cookies/. Она будет разобрана в 17.12.2019 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
LeetCode
Assign Cookies - LeetCode
Can you solve this real interview question? Assign Cookies - Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.
Each child i has a greed factor g[i], which is the minimum size…
Each child i has a greed factor g[i], which is the minimum size…
Следующая задача: https://leetcode.com/problems/assign-cookies/. Она будет разобрана в 17.12.2019 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
LeetCode
Assign Cookies - LeetCode
Can you solve this real interview question? Assign Cookies - Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.
Each child i has a greed factor g[i], which is the minimum size…
Each child i has a greed factor g[i], which is the minimum size…
Следующая задача: https://leetcode.com/problems/assign-cookies/. Она будет разобрана в 17.12.2019 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
Теги предыдущей задачи: динамическое программирование,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VE8K6yFSv_s
LeetCode
Assign Cookies - LeetCode
Can you solve this real interview question? Assign Cookies - Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.
Each child i has a greed factor g[i], which is the minimum size…
Each child i has a greed factor g[i], which is the minimum size…
Следующая задача: https://leetcode.com/problems/construct-the-rectangle/. Она будет разобрана в 25.12.2019 в 21:00 MSK
Теги предыдущей задачи: жадный алгоритм,сортировка,O(|g|log|g|+|s|log|s|) по времени,O(max(log|g|,log|s|)) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=l3lyF1GmH0M
Теги предыдущей задачи: жадный алгоритм,сортировка,O(|g|log|g|+|s|log|s|) по времени,O(max(log|g|,log|s|)) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=l3lyF1GmH0M
LeetCode
Construct the Rectangle - LeetCode
Can you solve this real interview question? Construct the Rectangle - A web developer needs to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L and…
Следующая задача: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/. Она будет разобрана в 29.12.2019 в 21:00 MSK
Теги предыдущей задачи: математика,перебор,сокращение перебора,O(sqrt(n)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vXBdgvz60oQ
Теги предыдущей задачи: математика,перебор,сокращение перебора,O(sqrt(n)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vXBdgvz60oQ
LeetCode
Binary Tree Level Order Traversal II - LeetCode
Can you solve this real interview question? Binary Tree Level Order Traversal II - Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root).
Example…
Example…
Следующая задача: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/. Она будет разобрана в 29.12.2019 в 21:00 MSK
Теги предыдущей задачи: математика,перебор,сокращение перебора,O(sqrt(n)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vXBdgvz60oQ
Теги предыдущей задачи: математика,перебор,сокращение перебора,O(sqrt(n)) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vXBdgvz60oQ
LeetCode
Binary Tree Level Order Traversal II - LeetCode
Can you solve this real interview question? Binary Tree Level Order Traversal II - Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root).
Example…
Example…
Следующая задача: https://leetcode.com/problems/sum-of-left-leaves/. Она будет разобрана в 31.12.2019 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=KkuzohcKROk
Теги предыдущей задачи: деревья,O(n) по времени,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=KkuzohcKROk
LeetCode
Sum of Left Leaves - LeetCode
Can you solve this real interview question? Sum of Left Leaves - Given the root of a binary tree, return the sum of all left leaves.
A leaf is a node with no children. A left leaf is a leaf that is the left child of another node.
Example 1:
[https:…
A leaf is a node with no children. A left leaf is a leaf that is the left child of another node.
Example 1:
[https:…
Следующая задача: https://leetcode.com/problems/binary-search/. Она будет разобрана в 02.01.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=Q2TSiZzRJzM
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=Q2TSiZzRJzM
LeetCode
Binary Search - LeetCode
Can you solve this real interview question? Binary Search - Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1.…
Следующая задача: https://leetcode.com/problems/merge-two-sorted-lists/. Она будет разобрана в 06.01.2020 в 21:00 MSK
Теги предыдущей задачи: двоичный поиск,O(logn) по времени,O(1) по памяти,lower_bound
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VL30zBhwjMQ
Теги предыдущей задачи: двоичный поиск,O(logn) по времени,O(1) по памяти,lower_bound
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VL30zBhwjMQ
LeetCode
Merge Two Sorted Lists - LeetCode
Can you solve this real interview question? Merge Two Sorted Lists - You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.…
Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.…
Следующая задача: https://leetcode.com/problems/merge-two-sorted-lists/. Она будет разобрана в 06.01.2020 в 21:00 MSK
Теги предыдущей задачи: двоичный поиск,O(logn) по времени,O(1) по памяти,lower_bound
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VL30zBhwjMQ
Теги предыдущей задачи: двоичный поиск,O(logn) по времени,O(1) по памяти,lower_bound
Разбор предыдущей задачи: https://www.youtube.com/watch?v=VL30zBhwjMQ
LeetCode
Merge Two Sorted Lists - LeetCode
Can you solve this real interview question? Merge Two Sorted Lists - You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.…
Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.…
Следующая задача: 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:…