-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
51 lines (42 loc) · 1.39 KB
/
Copy pathmain.py
File metadata and controls
51 lines (42 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from arr.longest_subsstring_without_repeating_character import lengthOfLongestSubstring
from arr.most_water_container import max_area, max_area_optimal, maxArea_app
from arr.move_zeros import move_zeros_brute
from arr.sort_colors import (
sort_colors_best,
sort_colors_brute,
sort_colors_optimal,
sortColors,
sortColors_app2,
)
from arr.three_sum import (
three_sum_best,
three_sum_brute,
three_sum_optimal,
threeSum_app,
)
from arr.trapping_rain_water import trap_app
from arr.two_sum_11 import two_sum_brute, two_sum_two_pointer
from stack.asteroid_collision_735 import asteroidCollision
from stack.daily_temparature_739 import dailyTemperatures_2
from stack.first_greater_element_2 import nextGreaterElements
from stack.online_stock_span_901 import StockSpanner2
# alternative_element_app1([-5, 1, 4, 2, 12])
# alternative_element_app2([-5, 1, 4, 2, 12])
# alternative_element_app3([-5, 1, 4, 2, 12])
# leaders_app3([16, 17, 4, 3, 5, 2])
# ans = happy_number(10)
# print(ans)
# numSubarrayProductLessThanK(nums=[10, 5, 2, 6], k=100)
# ans = threeSum_app([1, -1, -1, 0])
# print(ans)
# sortColors_app2([2, 0, 2, 1, 1, 0])
ans = asteroidCollision([3, 5, -6, 2, -1, 4])
print(ans)
# stockSpanner = StockSpanner2()
# stockSpanner.next(100)
# stockSpanner.next(80)
# stockSpanner.next(60)
# stockSpanner.next(70)
# stockSpanner.next(60)
# stockSpanner.next(75)
# stockSpanner.next(85)