leetcode
小郭不背锅
这个作者很懒,什么都没留下…
展开
-
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 codi...原创 2018-05-03 14:23:06 · 243 阅读 · 0 评论 -
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 without using extra...原创 2018-05-04 09:57:59 · 307 阅读 · 0 评论 -
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 without using...原创 2018-05-04 10:34:41 · 357 阅读 · 0 评论 -
byte转int时需要与&0xff和不与的区别
在理解byte转int时需要与0xff的原因之前,需要明白三个基础知识点:计算机是以补码的形式储存数字的 正数的补码是它自身,负数的补码是非符号位取反+1 原码的补码的补码=原码本身&的特性就是 0&0 = 0 0&1 = 0 1&1=10xff 的二进制表示位11111111基本数据类型包括有符号数据类型和无符号数据类型,当数据由低精度类型转变...原创 2019-07-17 19:23:05 · 176 阅读 · 0 评论