TGViewer
Channel Public Channel
LeetCode Problems

LeetCode Problems

@it_interviews

You will get one leetcode problem every 2 days. Also you can LeetcodeBot to own telegram group.

По всем вопросам и предложениям обращаться @emil_dev и @FyodorMenshikov
Subscribers
2.16K
Photos
0
Videos
0
Links
194

Showing posts older than #185 · Back to latest

Older Posts 20 shown
Post #184 2.36K
Следующая задача: https://leetcode.com/problems/delete-and-earn/. Она будет разобрана в 17.12.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,двумерное динамическое программирование,O(|A|*|B|) по времени,O(min(|A|,|B|)) по памяти,двоичный поиск,полиномиальные хэши,хэш-таблица,unordered_set,O(min(|A|,|B|)*(|A|+|B|)) по времени,O(min(|A|,|B|)) по памяти,timus 1517,наивное решение с эвристикой,слабые тесты

Разбор предыдущей задачи: https://www.youtube.com/watch?v=DMeQm7-_BEI
LeetCode Delete and Earn - LeetCode Can you solve this real interview question? Delete and Earn - You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times: * Pick any nums[i] and delete it to earn nums[i]…
Post #183 2.38K
Следующая задача: https://leetcode.com/problems/maximum-length-of-repeated-subarray/. Она будет разобрана в 11.12.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,максимум на префиксе,O(n) по времени,O(1) по памяти,leetcode 309

Разбор предыдущей задачи: https://www.youtube.com/watch?v=8whjaYFjBIk
LeetCode Maximum Length of Repeated Subarray - LeetCode Can you solve this real interview question? Maximum Length of Repeated Subarray - Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays. Example 1: Input: nums1 = [1,2,3,2,1], nums2 = [3,2,1,4…
Post #182 2.2K
Следующая задача: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/. Она будет разобрана в 09.12.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,двумерное динамическое программирование,O(|s1|*|s2|) по времени,O(min(|s1|,|s2|)) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=7SMCuF4ulIA
LeetCode Best Time to Buy and Sell Stock with Transaction Fee - LeetCode Can you solve this real interview question? Best Time to Buy and Sell Stock with Transaction Fee - You are given an array prices where prices[i] is the price of a given stock on the ith day, and an integer fee representing a transaction fee. Find the maximum…
Post #181 2.24K
Следующая задача: https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/. Она будет разобрана в 05.12.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,трёхмерное динамическое программирование,вероятность,уравнение шахматной доски,O(n*n*k) по времени,O(n*n) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=UxKF5PWv7XM
LeetCode Minimum ASCII Delete Sum for Two Strings - LeetCode Can you solve this real interview question? Minimum ASCII Delete Sum for Two Strings - Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Output: 231 Explanation:…
Post #180 2.04K
Следующая задача: https://leetcode.com/problems/knight-probability-in-chessboard/. Она будет разобрана в 03.12.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,leetcode 300,lower_bound,upper_bound,O(n^2) по времени,O(nlogn) по времени,O(n) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=kUeU1FUYwtQ
LeetCode Knight Probability in Chessboard - LeetCode Can you solve this real interview question? Knight Probability in Chessboard - On an n x n chessboard, a knight starts at the cell (row, column) and attempts to make exactly k moves. The rows and columns are 0-indexed, so the top-left cell is (0, 0), and…
Post #179 2.01K
Следующая задача: https://leetcode.com/problems/number-of-longest-increasing-subsequence/. Она будет разобрана в 01.12.2020 в 21:00 MSK

Теги предыдущей задачи: математика,разложение на простые множители,динамическое программирование,одномерное динамическое программирование,O(sqrt(n)) по времени,O(1) по памяти,O(nlogn) по времени,O(n) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=LhZrrmgSx_Q
LeetCode Number of Longest Increasing Subsequence - LeetCode Can you solve this real interview question? Number of Longest Increasing Subsequence - Given an integer array nums, return the number of longest increasing subsequences. Notice that the sequence has to be strictly increasing. Example 1: Input: nums…
  • 🔥 1
Post #178 1.99K
Следующая задача: https://leetcode.com/problems/2-keys-keyboard/. Она будет разобрана в 29.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,одномерное динамическое программирование,leetcode 300,жадный алгоритм,O(n^2) по времени,O(nlogn) по времени,O(n) по памяти,O(logn) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=8AZdzXgd2gc
LeetCode 2 Keys Keyboard - LeetCode Can you solve this real interview question? 2 Keys Keyboard - There is only one character 'A' on the screen of a notepad. You can perform one of two operations on this notepad for each step: * Copy All: You can copy all the characters present on the screen…
Post #177 1.86K
Следующая задача: https://leetcode.com/problems/maximum-length-of-pair-chain/. Она будет разобрана в 27.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по профилю,кодирование,O(product(1+needs[i])*|specials|*|needs|) по времени,O(product(1+needs[i])) по памяти,слабые тесты

Разбор предыдущей задачи: https://www.youtube.com/watch?v=QS91Mr1qaSI
LeetCode Maximum Length of Pair Chain - LeetCode Can you solve this real interview question? Maximum Length of Pair Chain - You are given an array of n pairs pairs where pairs[i] = [lefti, righti] and lefti < righti. A pair p2 = [c, d] follows a pair p1 = [a, b] if b < c. A chain of pairs can be formed…
Post #176 2.02K
Следующая задача: https://leetcode.com/problems/shopping-offers/. Она будет разобрана в 23.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,трёхмерное динамическое программирование,O(m*n*N) по времени,O(m*n) по памяти,уравнение шахматной доски

Разбор предыдущей задачи: https://www.youtube.com/watch?v=jXWd9jLTEDc
LeetCode Shopping Offers - LeetCode Can you solve this real interview question? Shopping Offers - In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of items with a sale price.…
Post #175 1.96K
Следующая задача: https://leetcode.com/problems/out-of-boundary-paths/. Она будет разобрана в 21.11.2020 в 21:00 MSK

Теги предыдущей задачи: интегральные суммы,модульная арифметика,unordered_set,unordered_map,O(|nums|) по времени в среднем,O(|nums|) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=q7tOK0JsHWo
LeetCode Out of Boundary Paths - LeetCode Can you solve this real interview question? Out of Boundary Paths - There is an m x n grid with a ball. The ball is initially at the position [startRow, startColumn]. You are allowed to move the ball to one of the four adjacent cells in the grid (possibly…
Post #174 1.97K
Следующая задача: https://leetcode.com/problems/continuous-subarray-sum/. Она будет разобрана в 19.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по подстрокам,O(|s|^2) по времени,O(|s|) по памяти,палиндромы

Разбор предыдущей задачи: https://www.youtube.com/watch?v=iFjs-lUv2nU
LeetCode Continuous Subarray Sum - LeetCode Can you solve this real interview question? Continuous Subarray Sum - Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise. A good subarray is a subarray where: * its length is at least two, and * the…
Post #173 1.84K
Post #172 1.76K
Следующая задача: https://leetcode.com/problems/longest-palindromic-subsequence/. Она будет разобрана в 17.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по подстрокам,O(|nums|^2) по времени,O(|nums|^2) по памяти,антагонистические игры,acmp 38

Разбор предыдущей задачи: https://www.youtube.com/watch?v=DdF2Y9ZVT6g
LeetCode Longest Palindromic Subsequence - LeetCode Can you solve this real interview question? Longest Palindromic Subsequence - Given a string s, find the longest palindromic subsequence's length in s. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements…
Post #171 2.02K
Следующая задача: https://leetcode.com/problems/ones-and-zeroes/. Она будет разобрана в 11.11.2020 в 21:00 MSK

Теги предыдущей задачи: конструктив,два указателя,O(|p|) по времени,O(|alphabet|) по памяти,сильные тесты

Разбор предыдущей задачи: https://www.youtube.com/watch?v=pXQkmHtbzxw
LeetCode Ones and Zeroes - LeetCode Can you solve this real interview question? Ones and Zeroes - You are given an array of binary strings strs and two integers m and n. Return the size of the largest subset of strs such that there are at most m 0's and n 1's in the subset. A set x is a subset…
Post #170 1.97K
Следующая задача: https://leetcode.com/problems/unique-substrings-in-wraparound-string/. Она будет разобрана в 09.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по подмножествам,антагонистические игры,нисходящее динамическое программирование,мемоизация,unordered_map,слабые тесты

Разбор предыдущей задачи: https://www.youtube.com/watch?v=LinRHBHCAxI
LeetCode Unique Substrings in Wraparound String - LeetCode Can you solve this real interview question? Unique Substrings in Wraparound String - We define the string base to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so base will look like this: * "...zabcdefghijklmnopqrstuvwxyzabcdefghi…
Post #168 1.84K
Следующая задача: https://leetcode.com/problems/arithmetic-slices/. Она будет разобрана в 05.11.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по суммам,O(target*|nums|) по времени,O(min(target,max(nums))) по памяти

Разбор предыдущей задачи: https://www.youtube.com/watch?v=WO8xgg1ybiY
LeetCode Arithmetic Slices - LeetCode Can you solve this real interview question? Arithmetic Slices - An integer array is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. * For example, [1,3,5,7,9], [7,7,7,7]…
Post #167 2K
Следующая задача: https://leetcode.com/problems/combination-sum-iv/. Она будет разобрана в 30.10.2020 в 21:00 MSK

Теги предыдущей задачи: жадный алгоритм,O(|nums|) по времени,O(1) по памяти,timus 1606

Разбор предыдущей задачи: https://www.youtube.com/watch?v=lM7oiOEhBnM
LeetCode Combination Sum IV - LeetCode Can you solve this real interview question? Combination Sum IV - Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target. The test cases are generated so that the answer can fit…
Post #166 1.9K
Следующая задача: https://leetcode.com/problems/wiggle-subsequence/. Она будет разобрана в 28.10.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,динамическое программирование по подстрокам,O(n^3) по времени,O(n^2) по памяти,почти монотонность,O(n^2) по времени,вопросы зрителей

Разбор предыдущей задачи: https://www.youtube.com/watch?v=tOtrGEsIuPY
LeetCode Wiggle Subsequence - LeetCode Can you solve this real interview question? Wiggle Subsequence - A wiggle sequence is a sequence where the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive…
Post #165 1.8K
Следующая задача: https://leetcode.com/problems/guess-number-higher-or-lower-ii/. Она будет разобрана в 26.10.2020 в 21:00 MSK

Теги предыдущей задачи: динамическое программирование,одномерное динамическое программирование,O(n^2) по времени,O(n) по памяти,leetcode 300

Разбор предыдущей задачи: https://www.youtube.com/watch?v=_wXoAft7PRU
LeetCode Guess Number Higher or Lower II - LeetCode Can you solve this real interview question? Guess Number Higher or Lower II - We are playing the Guessing Game. The game will work as follows: 1. I pick a number between 1 and n. 2. You guess a number. 3. If you guess the right number, you win the game.…
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →