自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

linc101的专栏

让我们聊聊前端

  • 博客(8)
  • 收藏
  • 关注

原创 [leetcode][javascript]Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before c

2015-06-24 22:22:45 538

原创 [leetcode][javascript]Reverse Bits

Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010

2015-06-24 21:15:37 950

原创 [leetcode][javascript]Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 00000000

2015-06-24 14:01:12 290

原创 [leetcode][javascript]Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2015-06-23 22:08:40 576

原创 [leetcode][javascript]Remove Linked List Elements

Remove Linked List Elements两个版本,一个原始版(196ms),一个略微优化过的版本(176ms)感觉leetcode对js的支持还是有些问题,两版本提交的结果还是有些差异的。/** * Definition for singly-linked list. * function ListNode(val) { * this

2015-06-23 20:33:56 564

原创 Count Primes

Description:Count the number of prime numbers less than a non-negative number, n.有三点优化偶数排除掉只除已经判别出来的素数只除小于目标数平方根的数此题决计还有很多优化空间。(待续)/** * @param {number} n * @return {number

2015-06-22 22:37:41 669

原创 Isomorphic Strings

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anot

2015-06-22 21:05:01 256

原创 Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999./** * @param {string} s * @return {number} */var romanToInt = function(s) {

2015-06-22 20:11:51 233

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除