Следующая задача: https://leetcode.com/problems/permutations/. Она будет разобрана в 18.03.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по временной памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vQGIcbNYCYc
Теги предыдущей задачи: деревья,O(n) по времени,O(height) по временной памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=vQGIcbNYCYc
LeetCode
Permutations - LeetCode
Can you solve this real interview question? Permutations - Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
Example 1:
Input: nums = [1,2,3]
Output: [[1,2,3],[1,3,2],[2,1,3],[2,3…
Example 1:
Input: nums = [1,2,3]
Output: [[1,2,3],[1,3,2],[2,1,3],[2,3…
Следующая задача: https://leetcode.com/problems/generate-parentheses/. Она будет разобрана в 20.03.2020 в 21:00 MSK
Теги предыдущей задачи: обработка массива,O(N*N!) по времени,O(N*N!) по памяти,рекурсивная реализация,нерекурсивная реализация,next_permutation,перестановки
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ECgv_d8LgJU
Теги предыдущей задачи: обработка массива,O(N*N!) по времени,O(N*N!) по памяти,рекурсивная реализация,нерекурсивная реализация,next_permutation,перестановки
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ECgv_d8LgJU
LeetCode
Generate Parentheses - LeetCode
Can you solve this real interview question? Generate Parentheses - Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
Example 1:
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]…
Example 1:
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]…
Следующая задача: https://leetcode.com/problems/palindromic-substrings/. Она будет разобрана в 24.03.2020 в 21:00 MSK
Теги предыдущей задачи: правильная скобочная последовательность,перебор-построение,числа Каталана,O(C(n) * n) по времени,O(C(n) * n) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=C5YfXfGH3pc
Теги предыдущей задачи: правильная скобочная последовательность,перебор-построение,числа Каталана,O(C(n) * n) по времени,O(C(n) * n) по памяти,рекурсивная реализация,нерекурсивная реализация
Разбор предыдущей задачи: https://www.youtube.com/watch?v=C5YfXfGH3pc
LeetCode
Palindromic Substrings - LeetCode
Can you solve this real interview question? Palindromic Substrings - Given a string s, return the number of palindromic substrings in it.
A string is a palindrome when it reads the same backward as forward.
A substring is a contiguous sequence of characters…
A string is a palindrome when it reads the same backward as forward.
A substring is a contiguous sequence of characters…
Следующая задача: https://leetcode.com/problems/top-k-frequent-elements/. Она будет разобрана в 26.03.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|s|^3) по времени,динамическое программирование,O(|s|^2) по времени,O(answer) по времени,алгоритм Манакера,O(|s|) по времени,acmp 1157
Разбор предыдущей задачи: https://www.youtube.com/watch?v=xT1p97eDIRk
Теги предыдущей задачи: обработка строк,O(|s|^3) по времени,динамическое программирование,O(|s|^2) по времени,O(answer) по времени,алгоритм Манакера,O(|s|) по времени,acmp 1157
Разбор предыдущей задачи: https://www.youtube.com/watch?v=xT1p97eDIRk
LeetCode
Top K Frequent Elements - LeetCode
Can you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.
Example 1:
Input: nums = [1,1,1,2,2,3], k = 2
Output: [1…
Example 1:
Input: nums = [1,1,1,2,2,3], k = 2
Output: [1…
Следующая задача: https://leetcode.com/problems/top-k-frequent-elements/. Она будет разобрана в 07.04.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,O(|s|^3) по времени,динамическое программирование,O(|s|^2) по времени,O(answer) по времени,алгоритм Манакера,O(|s|) по времени,acmp 1157
Разбор предыдущей задачи: https://www.youtube.com/watch?v=xT1p97eDIRk
Теги предыдущей задачи: обработка строк,O(|s|^3) по времени,динамическое программирование,O(|s|^2) по времени,O(answer) по времени,алгоритм Манакера,O(|s|) по времени,acmp 1157
Разбор предыдущей задачи: https://www.youtube.com/watch?v=xT1p97eDIRk
LeetCode
Top K Frequent Elements - LeetCode
Can you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.
Example 1:
Input: nums = [1,1,1,2,2,3], k = 2
Output: [1…
Example 1:
Input: nums = [1,1,1,2,2,3], k = 2
Output: [1…
Следующая задача: https://leetcode.com/problems/product-of-array-except-self/. Она будет разобрана в 09.04.2020 в 21:00 MSK
Теги предыдущей задачи: структуры данных,O(n) по времени,O(n) по памяти,unordered_map,nth_element
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gamjygyIzg0
Теги предыдущей задачи: структуры данных,O(n) по времени,O(n) по памяти,unordered_map,nth_element
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gamjygyIzg0
LeetCode
Product of Array Except Self - LeetCode
Can you solve this real interview question? Product of Array Except Self - Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
The product of any prefix or suffix of…
The product of any prefix or suffix of…
Следующая задача: https://leetcode.com/problems/subsets/. Она будет разобрана в 11.04.2020 в 21:00 MSK
Теги предыдущей задачи: обработка массива,O(n) по времени,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=1CvKUvzJvhQ
Теги предыдущей задачи: обработка массива,O(n) по времени,O(n) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=1CvKUvzJvhQ
LeetCode
Subsets - LeetCode
Can you solve this real interview question? Subsets - Given an integer array nums of unique elements, return all possible subsets (the power set).
The solution set must not contain duplicate subsets. Return the solution in any order.
Example 1:
Input:…
The solution set must not contain duplicate subsets. Return the solution in any order.
Example 1:
Input:…
Следующая задача: https://leetcode.com/problems/group-anagrams/. Она будет разобрана в 15.04.2020 в 21:00 MSK
Теги предыдущей задачи: перебор 2^n,нерекурсивная реализация,O(len*2^len) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=F5xQezA84p4
Теги предыдущей задачи: перебор 2^n,нерекурсивная реализация,O(len*2^len) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=F5xQezA84p4
LeetCode
Group Anagrams - LeetCode
Can you solve this real interview question? Group Anagrams - Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Example 1:
Input: strs = ["eat","tea","tan","ate","nat","bat"]
Output: [["bat"],["nat"…
Example 1:
Input: strs = ["eat","tea","tan","ate","nat","bat"]
Output: [["bat"],["nat"…
Следующая задача: https://leetcode.com/problems/rotate-image/. Она будет разобрана в 17.04.2020 в 21:00 MSK
Теги предыдущей задачи: структуры данных,unordered_map,каноническое представление,O(lenSum(strs)) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=zi7yMt2pMUQ
Теги предыдущей задачи: структуры данных,unordered_map,каноническое представление,O(lenSum(strs)) по времени и памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=zi7yMt2pMUQ
LeetCode
Rotate Image - LeetCode
Can you solve this real interview question? Rotate Image - You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which…
You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which…
Следующая задача: https://leetcode.com/problems/combination-sum/. Она будет разобрана в 19.04.2020 в 21:00 MSK
Теги предыдущей задачи: двумерные массивы,O(n*n) по времени,O(1) по памяти,транспонирование
Разбор предыдущей задачи: https://www.youtube.com/watch?v=idYyTWRxQcA
Теги предыдущей задачи: двумерные массивы,O(n*n) по времени,O(1) по памяти,транспонирование
Разбор предыдущей задачи: https://www.youtube.com/watch?v=idYyTWRxQcA
LeetCode
Combination Sum - LeetCode
Can you solve this real interview question? Combination Sum - Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations…
Следующая задача: https://leetcode.com/problems/kth-largest-element-in-an-array/. Она будет разобрана в 21.04.2020 в 21:00 MSK
Теги предыдущей задачи: перебор,динамическое программирование,O(target^|candidates|)
Разбор предыдущей задачи: https://www.youtube.com/watch?v=5Gs3flFkz0Q
Теги предыдущей задачи: перебор,динамическое программирование,O(target^|candidates|)
Разбор предыдущей задачи: https://www.youtube.com/watch?v=5Gs3flFkz0Q
LeetCode
Kth Largest Element in an Array - LeetCode
Can you solve this real interview question? Kth Largest Element in an Array - Given an integer array nums and an integer k, return the kth largest element in the array.
Note that it is the kth largest element in the sorted order, not the kth distinct element.…
Note that it is the kth largest element in the sorted order, not the kth distinct element.…
Следующая задача: https://leetcode.com/problems/find-the-duplicate-number/. Она будет разобрана в 23.04.2020 в 21:00 MSK
Теги предыдущей задачи: k-я порядковая статистика,O(n) по времени,nth_element,median of medians,mt19937,uniform_int_distribution,юбилей 700 часов
Разбор предыдущей задачи: https://www.youtube.com/watch?v=w-v9JSF2zUs
Теги предыдущей задачи: k-я порядковая статистика,O(n) по времени,nth_element,median of medians,mt19937,uniform_int_distribution,юбилей 700 часов
Разбор предыдущей задачи: https://www.youtube.com/watch?v=w-v9JSF2zUs
LeetCode
Find the Duplicate Number - LeetCode
Can you solve this real interview question? Find the Duplicate Number - Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.
There is only one repeated number in nums, return this repeated number.…
There is only one repeated number in nums, return this repeated number.…
Следующая задача: https://leetcode.com/problems/minimum-path-sum/. Она будет разобрана в 25.04.2020 в 21:00 MSK
Теги предыдущей задачи: алгоритм Флойда поиска цикла заяц и черепаха,O(n) по времени,O(1) по памяти,без модификации исходных данных
Разбор предыдущей задачи: https://www.youtube.com/watch?v=bZ06FaJBKT4
Теги предыдущей задачи: алгоритм Флойда поиска цикла заяц и черепаха,O(n) по времени,O(1) по памяти,без модификации исходных данных
Разбор предыдущей задачи: https://www.youtube.com/watch?v=bZ06FaJBKT4
LeetCode
Minimum Path Sum - LeetCode
Can you solve this real interview question? Minimum Path Sum - Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.
Note: You can only move either down or right…
Note: You can only move either down or right…
Есть места в группе, решающей задачи leetcode уровня medium. Если есть желающие присоединиться - обращайтесь. Стоимость 10 тыс рублей в месяц.
Следующая задача: https://leetcode.com/problems/binary-tree-level-order-traversal/. Она будет разобрана в 27.04.2020 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,O(n * m) по времени,O(1) по памяти,O(m) по памяти,O(min(n,m)) по памяти,O(n * m) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gyL-3ijrl8I
Теги предыдущей задачи: динамическое программирование,O(n * m) по времени,O(1) по памяти,O(m) по памяти,O(min(n,m)) по памяти,O(n * m) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gyL-3ijrl8I
LeetCode
Binary Tree Level Order Traversal - LeetCode
Can you solve this real interview question? Binary Tree Level Order Traversal - Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).
Example 1:
[https://assets.leetcode.c…
Example 1:
[https://assets.leetcode.c…
Следующая задача: https://leetcode.com/problems/unique-paths/. Она будет разобрана в 29.04.2020 в 21:00 MSK
Теги предыдущей задачи: деревья,O(n) по времени,рекурсивное решение,нерекурсивное решение,dfs,preorder traversal,inorder traversal,postorder traversal,bfs
Разбор предыдущей задачи: https://www.youtube.com/watch?v=062En8ycnF0
Теги предыдущей задачи: деревья,O(n) по времени,рекурсивное решение,нерекурсивное решение,dfs,preorder traversal,inorder traversal,postorder traversal,bfs
Разбор предыдущей задачи: https://www.youtube.com/watch?v=062En8ycnF0
LeetCode
Unique Paths - LeetCode
Can you solve this real interview question? Unique Paths - There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot…
Следующая задача: https://leetcode.com/problems/unique-binary-search-trees/. Она будет разобрана в 01.05.2020 в 21:00 MSK
Теги предыдущей задачи: комбинаторика,O(min(n,m)) по времени,O(1) по памяти,динамическое программирование
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ui_wBMqyizA
Теги предыдущей задачи: комбинаторика,O(min(n,m)) по времени,O(1) по памяти,динамическое программирование
Разбор предыдущей задачи: https://www.youtube.com/watch?v=ui_wBMqyizA
LeetCode
Unique Binary Search Trees - LeetCode
Can you solve this real interview question? Unique Binary Search Trees - Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n.
Example 1:
[https://assets.leet…
Example 1:
[https://assets.leet…
Следующая задача: https://leetcode.com/problems/house-robber-iii/. Она будет разобрана в 05.05.2020 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,O(n^2) по времени,O(n) по памяти,деревья
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gcH_z81WxLc
Теги предыдущей задачи: динамическое программирование,O(n^2) по времени,O(n) по памяти,деревья
Разбор предыдущей задачи: https://www.youtube.com/watch?v=gcH_z81WxLc
LeetCode
House Robber III - LeetCode
Can you solve this real interview question? House Robber III - The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root.
Besides the root, each house has one and only one parent house. After a tour…
Besides the root, each house has one and only one parent house. After a tour…
Следующая задача: https://leetcode.com/problems/container-with-most-water/. Она будет разобрана в 07.05.2020 в 21:00 MSK
Теги предыдущей задачи: динамическое программирование,деревья,O(n) по времени,O(height) по памяти,рекурсивное решение,нерекурсивное решение
Разбор предыдущей задачи: https://www.youtube.com/watch?v=AXzNDLur84E
Теги предыдущей задачи: динамическое программирование,деревья,O(n) по времени,O(height) по памяти,рекурсивное решение,нерекурсивное решение
Разбор предыдущей задачи: https://www.youtube.com/watch?v=AXzNDLur84E
LeetCode
Container With Most Water - LeetCode
Can you solve this real interview question? Container With Most Water - You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).
Find two lines that together…
Find two lines that together…
Следующая задача: https://leetcode.com/problems/decode-string/. Она будет разобрана в 09.05.2020 в 21:00 MSK
Теги предыдущей задачи: два указателя,доказательство,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=eauynef2Qts
Теги предыдущей задачи: два указателя,доказательство,O(n) по времени,O(1) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=eauynef2Qts
LeetCode
Decode String - LeetCode
Can you solve this real interview question? Decode String - Given an encoded string, return its decoded string.
The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is…
The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is…
Следующая задача: https://leetcode.com/problems/task-scheduler/. Она будет разобрана в 11.05.2020 в 21:00 MSK
Теги предыдущей задачи: обработка строк,стек,O(inputSize + outputSize) по времени,O(outputSize) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=wyxdEReiMtg
Теги предыдущей задачи: обработка строк,стек,O(inputSize + outputSize) по времени,O(outputSize) по памяти
Разбор предыдущей задачи: https://www.youtube.com/watch?v=wyxdEReiMtg
LeetCode
Task Scheduler - LeetCode
Can you solve this real interview question? Task Scheduler - You are given an array of CPU tasks, each labeled with a letter from A to Z, and a number n. Each CPU interval can be idle or allow the completion of one task. Tasks can be completed in any order…