LeetCode: 1282-Group the People Given the Group Size They Belong To 解題紀錄
There are n people that are split into some unknown number of groups. Each person is labeled with a unique ID from 0 to n - 1.
There are n people that are split into some unknown number of groups. Each person is labeled with a unique ID from 0 to n - 1.
Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet.
There is an integer array nums sorted in ascending order (with distinct values).
Given a directed acyclic graph, with n vertices numbered from 0 to n-1, and an array edges where edges[i] = [fromi, toi] represents a directed edge from node fromi to node toi.
Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where:
answer[0] is a list of all distinct integers in nums1 which are not present in nums2.answer[1] is a list of all distinct integers in nums2 which are not present in nums1.There is a function signFunc(x) that returns:
You have a set which contains all positive integers [1, 2, 3, 4, 5, ...].
Implement the SmallestInfiniteSet class:
You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than the other, append the additional letters onto the end of the merged string.