码迷,mamicode.com
首页 >  
搜索关键字:majority element    ( 12075个结果
[leetcode] Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
分类:其他好文   时间:2014-07-07 23:02:31    阅读次数:193
[LeetCode] Single Number II
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:其他好文   时间:2014-07-07 22:57:13    阅读次数:309
Problem Single Number II
Problem Description:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Solution:1 Arrays.sort(A...
分类:其他好文   时间:2014-07-07 16:10:04    阅读次数:174
Problem Single Number
Problem Description:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Solution: 1 public int singleNumber(int...
分类:其他好文   时间:2014-07-07 16:04:12    阅读次数:178
UVA 11995
I Can Guess the Data Structure!Time limit: 1.000 secondsThere is a bag-like data structure, supporting two operations:1 xThrow an element x into the b...
分类:其他好文   时间:2014-07-07 13:26:22    阅读次数:296
[leetcode] Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
分类:其他好文   时间:2014-07-02 00:33:49    阅读次数:204
Single Number
题目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it witho...
分类:其他好文   时间:2014-06-30 19:38:37    阅读次数:226
Single Number II
题目 Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it...
分类:其他好文   时间:2014-06-30 19:23:18    阅读次数:200
Set Matrix Zeroes
题目 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up: Did you use extra space? A straight forward solution using O(mn) space is probab...
分类:其他好文   时间:2014-06-30 06:17:09    阅读次数:245
leetCode: Single Number II [137]
【题目】 Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? 【题意】 给定一个整数以外,其中除了一个整数只出现一次以外...
分类:其他好文   时间:2014-06-29 22:52:35    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!