개발공부

개발공부/algorithm

[Leetcode][python] 1137. N-th Tribonacci Number - DP

Problem Leetcode 1137. N-th Tribonacci Number - DP Level: Easy Link N-th Tribonacci Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach Classic fibonacci problem with DP algorithm class Solution: def tribonacci(self, n: int) -> int: arr = [0, 1, 1] if n < 3: return..

개발공부/algorithm

[Leetcode][python] 938: Range sum BST - BFS

Problem Leetcode 938: Range sum BST Level: Easy Link Range Sum of BST - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self...

개발공부/algorithm

[Leetcode][python] 563. Binary Tree Tilt - DFS

Leetcode 563. Binary Tree Tilt Level: easy Link Binary Tree Tilt - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach # 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..

so.py
'개발공부' 카테고리의 글 목록 (8 Page)