上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 79 下一页
摘要: package LeetCode_3 import java.lang.StringBuilder /** * 3. Longest Substring Without Repeating Characters * https://leetcode.com/problems/longest-subs 阅读全文
posted @ 2019-09-19 01:41 johnny_zhao 阅读(94) 评论(0) 推荐(0) 编辑
摘要: /** * 905. Sort Array By Parity * https://leetcode.com/problems/sort-array-by-parity/description/ * * Given an array A of non-negative integers, return an array consisting of all the even elements of 阅读全文
posted @ 2019-09-08 00:11 johnny_zhao 阅读(96) 评论(0) 推荐(0) 编辑
摘要: /** 48. Rotate Image https://leetcode.com/problems/rotate-image/description/ */ class Solution { public void rotate(int[][] matrix) { //N x N matrix have floor(N/2) square cycers, for example 4x4 matr 阅读全文
posted @ 2019-09-07 23:51 johnny_zhao 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 在ubuntu系统下,更新android studio 3.5时,提示 jre/bin/java没写权限,发现解决方法如下: https://askubuntu.com/questions/1083125/android-studio-update-issue-with-jre-bin-java 阅读全文
posted @ 2019-09-04 14:28 johnny_zhao 阅读(531) 评论(0) 推荐(0) 编辑
摘要: /** * 700. Search in a Binary Search Tree * https://leetcode.com/problems/search-in-a-binary-search-tree/description/ * */ class TreeNode(var `val`: Int) { var left: TreeNode? = null var ... 阅读全文
posted @ 2019-08-29 22:34 johnny_zhao 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 958. Check Completeness of a Binary Tree //https://leetcode.com/problems/check-completeness-of-a-binary-tree/description/ class TreeNode(var `val`: Int) { var left: TreeNode? = null var right: TreeNod 阅读全文
posted @ 2019-08-29 14:08 johnny_zhao 阅读(100) 评论(0) 推荐(0) 编辑
摘要: class MinHeap constructor(maxSize_: Int) { var size = 0 var maxSize = maxSize_ var heapArray: Array? = null companion object { const val FRONT = 1 ... 阅读全文
posted @ 2019-08-04 00:37 johnny_zhao 阅读(241) 评论(0) 推荐(0) 编辑
摘要: /** * This problem was asked by Microsoft. Given an array of numbers and a number k, determine if there are three entries in the array which add up to the specified number k. For example, given [20... 阅读全文
posted @ 2019-07-28 12:38 johnny_zhao 阅读(217) 评论(0) 推荐(0) 编辑
摘要: /** * 239. Sliding Window Maximum * https://leetcode.com/problems/sliding-window-maximum/description/ * * Given an array nums, there is a sliding window of size k which is moving from the very le... 阅读全文
posted @ 2019-07-20 16:18 johnny_zhao 阅读(115) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_285 import java.util.* /** * 285. Inorder Successor in BST * (Prime) * Given a binary search tree and a node in it, find the in-order 阅读全文
posted @ 2019-07-02 01:55 johnny_zhao 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 79 下一页