摘要: import org.junit.Test;import java.util.Arrays;public class MergeSort { /** * @param A: sorted integer array A * @param B: s... 阅读全文
posted @ 2018-08-07 23:05 wei1 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;import java.util.*;public class KthLargestElement { /** * @param k : description of k * @param num... 阅读全文
posted @ 2018-08-07 23:04 wei1 阅读(72) 评论(0) 推荐(0) 编辑
摘要: //答案来源//[https://blog.csdn.net/surp2011/article/details/51168272](https://blog.csdn.net/surp2011/article/details/51168272)/** * 描述 * 设... 阅读全文
posted @ 2018-08-07 23:02 wei1 阅读(93) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;public class NthUglyNumber { /** * @param n: An integer * @return: the nth prime number as descriptio... 阅读全文
posted @ 2018-08-07 23:01 wei1 阅读(94) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;import java.util.Arrays;import java.util.List;public class FizzBuzz { /** * @param n: An integer * @r... 阅读全文
posted @ 2018-08-07 23:00 wei1 阅读(113) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;public class DigitCounts { /* * @param : An integer * @param : An integer * @return: An integer d... 阅读全文
posted @ 2018-08-07 22:59 wei1 阅读(90) 评论(0) 推荐(0) 编辑
摘要: public class BinarySearch { /** * @param nums: The integer array. * @param target: Target to find. * @return: The fir... 阅读全文
posted @ 2018-08-07 22:27 wei1 阅读(87) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;public class AplusB { /** * @param a: An integer * @param b: An integer * @return: The sum of a a... 阅读全文
posted @ 2018-08-07 22:26 wei1 阅读(149) 评论(0) 推荐(0) 编辑
摘要: package dp;import org.junit.Test;public class NumWays { /** * @param n: non-negative integer, n posts * @param k: non-negat... 阅读全文
posted @ 2018-08-07 22:25 wei1 阅读(121) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test;public class IsInterleave { /** * @param s1: A string * @param s2: A string * @param s3: A string... 阅读全文
posted @ 2018-08-07 21:47 wei1 阅读(109) 评论(0) 推荐(0) 编辑