上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页
摘要: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
posted @ 2017-02-10 05:48 CodesKiller 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 这道题和之前的Game of Live有些不一样,区别在于,之前那道题目只有两种状态,即矩阵只有0和1两种,并且 阅读全文
posted @ 2017-02-10 03:36 CodesKiller 阅读(124) 评论(0) 推荐(0) 编辑
摘要: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2017-02-10 02:57 CodesKiller 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja 阅读全文
posted @ 2017-02-10 01:21 CodesKiller 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2017-02-09 08:47 CodesKiller 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. 此题和之前的find the duplicate number比较像,代码如下: 阅读全文
posted @ 2017-02-09 07:58 CodesKiller 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 本题可以利用之前的find the duplicate number的方法来解, 阅读全文
posted @ 2017-02-09 07:53 CodesKiller 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2017-02-09 07:46 CodesKiller 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2017-02-09 04:06 CodesKiller 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note:Your algorithm sh 阅读全文
posted @ 2017-02-08 15:22 CodesKiller 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页