
Leetcode
文章平均质量分 58
Linna1998
北京大学2015级计算机科学与技术专业本科生。
熟悉C/C++,掌握Python,x86汇编,了解Java。
立志成为棒棒的程序员,加油吧少女!
PS.我的Github主页https://github.com/linna1998 欢迎来玩呀:)
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode 1.Two Sum
1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. 问题描述: 给了一个数组和一个目标数target,要求找出数组中的两个数加起来恰好是target,然后返回这两个数的位置。 题目中原创 2017-01-15 09:25:28 · 228 阅读 · 0 评论 -
Leetcode 461. Hamming Distance
461. Hamming Distance The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the H原创 2017-01-15 21:21:29 · 318 阅读 · 0 评论 -
LeetCode 485. Max Consecutive Ones
485. Max Consecutive Ones Given a binary array, find the maximum number of consecutive 1s in this array 给一个01串,求其中最长的连续1串当中1的个数 简单粗暴的题目吧,直接算长度lastnum,碰到1累加,碰到0清0 然后用一个result表示lastnu原创 2017-01-16 11:06:17 · 274 阅读 · 0 评论 -
LeetCode 476. Number Complement
476. Number Complement Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guarantee原创 2017-01-16 13:08:09 · 276 阅读 · 0 评论 -
Leetcode 290. Word Pattern
Description 我也不知道为什么一个easy题目,被我写出了荡气回肠余音绕梁的感觉TAT题目描述是这样的:亲爱的你有一个pattern 比如"abba" 还有一个字串用空格分隔的,比如"cat dog dog cat" 你现在要看这两个是不是匹配呀~ Errors 愚蠢的我出错了无数次,硬生生把leetcode用成了debug平台。出错的情况包括: 数组越界 逻辑错误。比如pattern...原创 2019-03-27 22:59:38 · 171 阅读 · 0 评论