202. Happy Number
[Happy 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](https://leetcode.com/problems/happy-number/)
Real MySQL 02
Real MySQL 01
326. Power of Three
[Power of Three - 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](https://leetcode.com/problems/power-of-three/)
122. Best Time to Buy and Sell Stock II
1. Greedy
class Solution:
def maxProfit(self, prices: List[int]) -> int:
stack = []
answer = 0
for price in prices:
if not stack:
stack.append(price)
else:
if stack[-1] < price:
answer+=price-stack[-1]
stack.pop()
stack.append(price)
else:
stack.pop()
stack.append(price)
return answer

378. Kth Smallest Element in a Sorted Matrix
[Kth Smallest Element in a Sorted Matrix - 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](https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/)
289. Game of Life
[Game of Life - 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](https://leetcode.com/problems/game-of-life/)
191. Number of 1 Bits
[Number of 1 Bits - 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](https://leetcode.com/problems/number-of-1-bits/)
108. Convert Sorted Array to Binary Search Tree
[Convert Sorted Array to Binary Search Tree - 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](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)

