上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 43 下一页

2019年5月23日

68. Text Justification (JAVA)

摘要: Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justif 阅读全文

posted @ 2019-05-23 12:41 joannae 阅读(207) 评论(0) 推荐(0) 编辑

62. Unique Paths (JAVA)

摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文

posted @ 2019-05-23 11:40 joannae 阅读(242) 评论(0) 推荐(0) 编辑

2019年5月22日

60. Permutation Sequence (JAVA)

摘要: The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following seque 阅读全文

posted @ 2019-05-22 19:03 joannae 阅读(100) 评论(0) 推荐(0) 编辑

56. Merge Intervals (JAVA)

摘要: Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: NOTE: input types have been changed on April 15, 2019. Please 阅读全文

posted @ 2019-05-22 15:21 joannae 阅读(315) 评论(0) 推荐(0) 编辑

2019年5月21日

53. Maximum Subarray (JAVA)

摘要: iven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Follo 阅读全文

posted @ 2019-05-21 17:29 joannae 阅读(132) 评论(0) 推荐(0) 编辑

2019年5月17日

Java的volatile

摘要: volatile作用对象:volatile只作用于共享变量。 共享变量:在多个线程之间能够被共享的变量被称为共享变量。共享变量包括所有的实例变量,静态变量和数组元素。 volatile作用: 1、同步(可见性) 同synchronized相比(synchronized通常称为重量级锁),volati 阅读全文

posted @ 2019-05-17 17:17 joannae 阅读(193) 评论(0) 推荐(0) 编辑

int和Integer的区别

摘要: 1、Integer是int的包装类,int则是java的一种基本数据类型 2、Integer变量必须实例化后才能使用,而int变量不需要 3、Integer实际是对象的引用,当new一个Integer时,实际上是生成一个指针指向此对象;而int则是直接存储数据值 4、Integer的默认值是null 阅读全文

posted @ 2019-05-17 16:28 joannae 阅读(147) 评论(0) 推荐(0) 编辑

2019年5月16日

Java线程

摘要: JAVA线程实现的三种方式: 1. 使用内核线程(Kernel-Level Thread,KLT) 由内核来完成线程切换,内核通过操纵调度器(Scheduler)对线程进行调度,并负责将线程的任务映射到各个处理器上。 轻量级进程(Light Weight Process,LWP):内核线程的一种高级 阅读全文

posted @ 2019-05-16 12:04 joannae 阅读(115) 评论(0) 推荐(0) 编辑

JVM内存

摘要: JVM内存简介 JVM执行Java程序的过程:Java源代码文件(.java)会被Java编译器编译为字节码文件(.class),然后由JVM中的类加载器加载各个类的字节码文件,加载完毕之后,交由JVM执行引擎执行。 在上述过程中,JVM会用一段空间来存储执行程序期间需要用到的数据和相关信息,这段空 阅读全文

posted @ 2019-05-16 11:52 joannae 阅读(158) 评论(0) 推荐(0) 编辑

2019年5月6日

50. Pow(x, n) (JAVA)

摘要: Implement pow(x, n), which calculates x raised to the power n(xn). Example 1: Example 2: Example 3: Note: -100.0 < x < 100.0 n is a 32-bit signed inte 阅读全文

posted @ 2019-05-06 17:03 joannae 阅读(167) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 43 下一页

导航