Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eabbc98

Browse files
add: array 938
1 parent 19f3261 commit eabbc98

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

‎array/main.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,36 @@
2727
# nums = [1,4,4]
2828

2929
# a = Solution()
30-
# print(a.minSubArrayLen(target, nums))
30+
# print(a.minSubArrayLen(target, nums))
31+
32+
################*******@Ziyodev*********######################
33+
#--------------- 938. Range Sum of BST --------------#
34+
# start | 17:04
35+
# end | 17:13
36+
37+
# class Solution(object):
38+
# def rangeSumBST(self, root, low, high):
39+
# """
40+
# :type root: TreeNode
41+
# :type low: int
42+
# :type high: int
43+
# :rtype: int
44+
# """
45+
# def calculate(root):
46+
# if root:
47+
# if low <= root.val <= high:
48+
# self.res += root.val
49+
# if low < root.val:
50+
# calculate(root.left)
51+
# if high > root.val:
52+
# calculate(root.right)
53+
# self.res = 0
54+
# calculate(root)
55+
# return self.res
56+
57+
# root = [10,5,15,3,7,18]
58+
# low = 7
59+
# high = 15
60+
61+
# a = Solution()
62+
# print(a.rangeSumBST(root, low, high))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /