自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

sadjuno的博客

一只埋头进步的小菜鸟

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

原创 [389]Find the Difference

【题目描述】Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the lett

2016-08-31 21:58:29 209

原创 [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.Example:

2016-08-31 21:27:58 204

原创 [299] Bulls and Cows

[题目描述]You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you prov

2016-08-31 15:01:36 246

原创 [345]Reverse Vowels of a String

【题目描述】Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example 2:Given s = "leetcode", return "leotce

2016-08-31 11:01:18 216

原创 [342] Power of Four

【题目描述】Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example:Given num = 16, return true. Given num = 5, return false.Follow up: Could you solv

2016-08-27 21:22:27 353

原创 [387] First Unique Character in a String

【题目描述】Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode",return 2.

2016-08-27 21:13:47 318

原创 [326]Power of Three

【题目描述】Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?【题目思路】如果是3的幂必然取以3为底的对数得到的是整数,而stl库里有log的函数,

2016-08-27 20:28:08 367

原创 [350]Intersection of Two Arrays II

【题目描述】Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should

2016-08-21 21:00:13 176

原创 [349]Intersection of Two Arrays

【题目描述】Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be un

2016-08-21 20:22:36 146

原创 [383]Ransom Note

【题目描述】
Given
 an 
arbitrary
 ransom
 note
 string 
and 
another 
string 
containing 
letters from
 all 
the 
magazines,
 write 
a 
function 
that 
will 
return 
true 
if 
the 
ransom 
 note 
can

2016-08-21 17:19:04 301

转载 线程安全和线程不安全理解

转载自:http://blog.csdn.net/ghevinn/article/details/37764791线程安全就是多线程访问时,采用了加锁机制,当一个线程访问该类的某个数据时,进行保护,其他线程不能进行访问直到该线程读取完,其他线程才可使用。不会出现数据不一致或者数据污染。 线程不安全就是不提供数据访问保护,有可能出现多个线程先后更改数据造成所得到的数据是脏数据

2016-08-21 15:32:11 347

空空如也

空空如也

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

TA关注的人

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