Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum.
A leaf is a node with no children.
회사에서 Enum을 사용하여 Redis Key를 생성하여 저장하는 로직을 구현하였다.
그런데 똑같은 Data로 Key를 생성하여 조회하는데
Redis에서 조회하지 못하는 이슈가 발생했다.
뭐가 문제였고 어떤 부분을 주의해야 하는지 알아보자.
You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times:
Pick any nums[i] and delete it to earn nums[i] points. Afterwards, you must delete every element equal to nums[i] - 1 and every element equal to nums[i] + 1.
Return the maximum number of points you can earn by applying the above operation some number of times.
Given an integer array nums that may contain duplicates, return all possible subsets (the power set).
The solution set must not contain duplicate subsets. Return the solution in any order.