――Do you have a deep understanding of the technology you have touched on? --Paste the index to make it faster. ⇒ Why? ――People who have a shallow understanding of the concepts that they have touched on in the past will continue to work with a shallow understanding.
--To be able to understand and explain complex concepts
#Recursive function
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def rangeSumBST(self, root: TreeNode, L: int, R: int) -> int:
valid_vals = []
def search(root):
if root.val >= L and root.val<=R:
valid_vals.append(root.val)
if root.left:
search(root.left)
if root.right:
search(root.right)
search(root)
return sum(valid_vals)
#Decimal number 2,8,Convert to hexadecimal
x = 10
print(bin(x))
print(oct(x))
print(hex(x))
# 2,8,Convert hexadecimal numbers to decimal numbers
print(int('10100', 2))
print(int('24', 8))
print(int('14', 16))
s_org = 'pYThon proGramminG laNguAge'
s_org.upper()
# PYTHON PROGRAMMING LANGUAGE
s_org.lower()
# python programming language
class Solution:
def busyStudent(self, startTime: List[int], endTime: List[int], queryTime: int) -> int:
cnt = 0
for m, n in zip(startTime, endTime):
if m <= queryTime and n >= queryTime:
cnt += 1
return cnt
l1 = ['d', 'b', 'c', 'a']
l2 = sorted(l1)
l2 = sorted(l1, reverse=True)
print(l2) # ['d', 'c', 'b', 'a']
a = []
if not a:
print("The list is empty")
Find the smallest integer greater than or equal to x for a real number x
from math import ceil
c = ceil(r)
Recommended Posts