
重刷leetcode
Crystal_ting
个人博客 limengting.site
展开
-
leetcode283 Move Zeros
package array;/*Given an array numswrite a function to move all 0's to the end of itwhile maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,12]Output: [1,3,12,0,...原创 2018-08-16 15:27:04 · 447 阅读 · 0 评论 -
leetcode169 Majority Element
package array;import java.util.HashMap;public class leetcode169MajorityElement { /* Given an array of size n, find the majority element. The majority element is the element that appear...原创 2018-08-16 15:28:34 · 284 阅读 · 0 评论 -
leetcode448 Find All Numbers Disappeared in an Array
package array;import java.util.ArrayList;public class leecode448FindNumbersNotAppear { /*448. Find All Numbers Disappeared in an ArrayGiven an array of integers where 1 ≤ a[i] ≤ n (n = size o...原创 2018-08-16 15:29:43 · 344 阅读 · 0 评论