LeetCode 547. Friend Circles
Description https://leetcode.com/problems/friend-circles/description/ There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/friend-circles/description/ There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive…
Union Find is a data structure to find whether two elements in the same group (Find) merge two groups of…
Description Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return…
Description https://leetcode.com/problems/largest-rectangle-in-histogram/ Given an array of integers heights representing the histogram’s bar height where the width of each bar is 1, return the area…
Description You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version…
Description Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer…
Description https://leetcode.com/problems/4sum/description/ Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array…
Description https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not…
Description Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more…
Description https://leetcode.com/problems/binary-tree-level-order-traversal/ Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by…