刷题记录
进击的小菜菜
记录菜鸡的进阶史。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
备战春招/考研复试--剑指offer--数组中出现次数超过一半的数字
题目描述如下: 数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字。例如输入一个长度为9的数组{1,2,3,2,2,2,5,4,2}。由于数字2在数组中出现了5次,超过数组长度的一半,因此输出2。如果不存在则输出0。 个人思路: 此题目曾经是考研计算机统考命题408中出现过的题目,解析中给出了如下方案: 如果一个数字能够在一个数组中出现的...原创 2019-12-27 09:42:05 · 350 阅读 · 0 评论 -
LeetCode题目之101-Symmetric Tree
题目描述如下: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ ...原创 2019-11-04 15:21:26 · 329 阅读 · 0 评论 -
LeetCode题目之100-Same Tree
题目描述如下: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value. ...原创 2019-10-31 16:47:38 · 226 阅读 · 0 评论 -
LeetCode题目之83-Remove Duplicates from Sorted List
题目描述如下: Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Input: 1->1->2 Output: 1->2 Example 2: Input: 1->1->2->3->3 Outpu...原创 2019-10-20 18:37:20 · 253 阅读 · 0 评论 -
LeetCode题目之67
题目描述如下: Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or0. Example 1: Input: a = "11", b = "1" Output: "10...原创 2019-10-19 19:10:17 · 204 阅读 · 0 评论 -
LeetCode题目之66
题目描述如下: Given a non-empty array of digitsrepresenting a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is at the head of the list, and eac...原创 2019-10-19 10:24:48 · 274 阅读 · 0 评论
分享