1. Partition Labels
You are given a string s. We want to partition the string into as many parts as possible so that each letter appears in at most one part.
Note that the partition is done so that after concatenating all the parts in order, the resultant string should be s.
Return a list of integers representing the size of these parts.
2. Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
3. Kth Largest Element in an Array
Given an integer array nums and an integer k, return the kth largest element in the array.
Note that it is the kth largest element in the sorted order, not the kth distinct element.
You must solve it in O(n) time complexity.
4. Set Matrix Zeroes
Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's.
You must do it in place.
5. 养殖问题
给n个养鸡场,每个场里有不同数量的鸡,每场每天增加k只,每天结束后卖掉数量最多的场里一半的鸡(取floor),问m天过后所有场总共的鸡数。
比如,三个养鸡场 [100, 200, 400],每天增加k=100只,过m=3天后总共 [100, 200, 400] -> [200, 300, 250] -> [300, 200, 350] -> [400, 300, 225],400 + 300 + 225 = 925只。