Skip to content

Commit 9ff0fa4

Browse files
authored
Updated readme
1 parent 16a1b5e commit 9ff0fa4

File tree

3 files changed

+11
-25
lines changed

3 files changed

+11
-25
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ Python-based LeetCode algorithm problem solutions, regularly updated.
764764
| 0097 |[Interleaving String](src/main/python/g0001_0100/s0097_interleaving_string/Solution0097.py)| Medium | String, Dynamic_Programming | 37 | 90.93
765765
| 0072 |[Edit Distance](src/main/python/g0001_0100/s0072_edit_distance/Solution0072.py)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, LeetCode_75_DP/Multidimensional, Big_O_Time_O(n^2)_Space_O(n2) | 23 | 98.84
766766
| 0123 |[Best Time to Buy and Sell Stock III](src/main/python/g0101_0200/s0123_best_time_to_buy_and_sell_stock_iii/Solution0123.py)| Hard | Array, Dynamic_Programming | 232 | 75.22
767-
| 0188 |[Best Time to Buy and Sell Stock IV](src/main/python/g0101_0200/s0188_best_time_to_buy_and_sell_stock_iv/Solution.java)| Hard | Array, Dynamic_Programming | 1 | 99.73
767+
| 0188 |[Best Time to Buy and Sell Stock IV](src/main/python/g0101_0200/s0188_best_time_to_buy_and_sell_stock_iv/Solution0188.py)| Hard | Array, Dynamic_Programming | 50 | 80.74
768768
| 0221 |[Maximal Square](src/main/python/g0201_0300/s0221_maximal_square/Solution0221.py)| Medium | Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 129 | 64.49
769769

770770
### Data Structure I
@@ -1734,7 +1734,7 @@ Python-based LeetCode algorithm problem solutions, regularly updated.
17341734
| 0191 |[Number of 1 Bits](src/main/python/g0101_0200/s0191_number_of_1_bits/Solution0191.py)| Easy | Top_Interview_Questions, Bit_Manipulation, Algorithm_I_Day_13_Bit_Manipulation, Programming_Skills_I_Day_2_Operator, Udemy_Bit_Manipulation, Top_Interview_150_Bit_Manipulation | 0 | 100.00
17351735
| 0190 |[Reverse Bits](src/main/python/g0101_0200/s0190_reverse_bits/Solution0190.py)| Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer, Algorithm_I_Day_14_Bit_Manipulation, Udemy_Bit_Manipulation, Top_Interview_150_Bit_Manipulation | 36 | 75.17
17361736
| 0189 |[Rotate Array](src/main/python/g0101_0200/s0189_rotate_array/Solution0189.py)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Algorithm_I_Day_2_Two_Pointers, Udemy_Arrays, Top_Interview_150_Array/String, Big_O_Time_O(n)_Space_O(1) | 3 | 74.65
1737-
| 0188 |[Best Time to Buy and Sell Stock IV](src/main/python/g0101_0200/s0188_best_time_to_buy_and_sell_stock_iv/Solution.java)| Hard | Array, Dynamic_Programming, Top_Interview_150_Multidimensional_DP | 1 | 99.73
1737+
| 0188 |[Best Time to Buy and Sell Stock IV](src/main/python/g0101_0200/s0188_best_time_to_buy_and_sell_stock_iv/Solution0188.py)| Hard | Array, Dynamic_Programming, Top_Interview_150_Multidimensional_DP | 50 | 80.74
17381738
| 0173 |[Binary Search Tree Iterator](src/main/python/g0101_0200/s0173_binary_search_tree_iterator/Solution0173.py)| Medium | Tree, Binary_Tree, Stack, Design, Binary_Search_Tree, Iterator, Data_Structure_II_Day_17_Tree, Programming_Skills_II_Day_16, Level_2_Day_9_Binary_Search_Tree, Top_Interview_150_Binary_Tree_General | 2 | 92.39
17391739
| 0172 |[Factorial Trailing Zeroes](src/main/python/g0101_0200/s0172_factorial_trailing_zeroes/Solution0172.py)| Medium | Top_Interview_Questions, Math, Udemy_Integers, Top_Interview_150_Math | 0 | 100.00
17401740
| 0169 |[Majority Element](src/main/python/g0101_0200/s0169_majority_element/Solution0169.py)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Data_Structure_II_Day_1_Array, Udemy_Famous_Algorithm, Top_Interview_150_Array/String, Big_O_Time_O(n)_Space_O(1) | 7 | 56.72

src/main/python/g0101_0200/s0188_best_time_to_buy_and_sell_stock_iv/Solution.java

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import unittest
2+
from Solution0188 import Solution
3+
4+
class SolutionTest(unittest.TestCase):
5+
def test_maxProfit(self):
6+
self.assertEqual(Solution().maxProfit(2, [2, 4, 1]), 2)
7+
8+
def test_maxProfit2(self):
9+
self.assertEqual(Solution().maxProfit(2, [3, 2, 6, 5, 0, 3]), 7)

0 commit comments

Comments
 (0)