Problem Leetcode - 973: Closest point to the origin Level: Medium Link K Closest Points to Origin - 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 import math class Solution: def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: coords = [] for p in r..
Leetcode 929: Unique email addresses Level: Easy Link Unique Email Addresses - 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 For each email addresses, split the local and domain address If '.' in the local address, remove it. If '+' in the local address, remove string..
Leetcode: 1161 - Maximum level of sum of a binary tree Level: Medium Link Maximum Level Sum of a Binary 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 My approach Iterate through the tree with a bfs approach For each level, sum up the value of each leaf update to a dictiona..