- 博客(8)
- 问答 (1)
- 收藏
- 关注
转载 Java语言中的位运算及总结
Java语言中的位运算及总结 转载:http://blog.csdn.net/ujswml/article/details/5642991 二进制运算符 由于计算机内部的数据都以二进制的形式存在,所以在Java语言中提供了直接操作二进制的运算符,这就是下面要讲解的位运算符和移位运算符。 使用二进制的运算符,可以直接在二进制的基础上对数字进行操作,执行的效率比一般的
2017-01-18 17:28:18 500
原创 leetcode29:Divide Two Integers
Divide Two Integers Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT. package leetcode; public class leet29 { public static
2017-01-18 16:12:40 432
原创 leetcode28: Implement strStr()
Implement strStr Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 对haystack进行遍历,比较当前下标下,长度为needle.length()长的字符串是否与
2017-01-11 17:08:29 453
原创 设计模式:单例模式
单例模式 参考:百度百科 单例模式是一种常用的软件设计模式。在它的核心结构中只包含一个被称为单例的特殊类。通过单例模式可以保证系统中一个类只有一个实例 对于系统中的某些类来说,只有一个实例很重要,例如,一个系统中可以存在多个打印任务,但是只能有一个正在工作的任务;一个系统只能有一个窗口管理器或文件系统;一个系统只能有一个计时工具或ID(序号)生成器。如在Wi
2017-01-10 17:05:50 374
原创 leetcode27:Remove Element
Remove Element Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with cons
2017-01-08 10:34:16 302
原创 leetcode26:Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another
2017-01-08 09:36:48 299
原创 leetcode25: Reverse Nodes in k-Group
Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked listk at a time and return its modified list. k is a positive integer and is less than or equal to the length of the li
2017-01-07 20:33:01 356
原创 leetcode24:Swap Nodes in Pairs
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use on
2017-01-04 09:33:55 342
空空如也
Java中定义数组必须要指定长度吗,如果是为什么?
2015-11-29
TA创建的收藏夹 TA关注的收藏夹
TA关注的人