摘要:
package LeetCode_3 import java.lang.StringBuilder /** * 3. Longest Substring Without Repeating Characters * https://leetcode.com/problems/longest-subs 阅读全文
摘要:
/** * 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 阅读全文
摘要:
/** 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 阅读全文
摘要:
在ubuntu系统下,更新android studio 3.5时,提示 jre/bin/java没写权限,发现解决方法如下: https://askubuntu.com/questions/1083125/android-studio-update-issue-with-jre-bin-java 阅读全文
摘要:
/** * 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 ... 阅读全文
摘要:
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 阅读全文
摘要:
class MinHeap constructor(maxSize_: Int) { var size = 0 var maxSize = maxSize_ var heapArray: Array? = null companion object { const val FRONT = 1 ... 阅读全文
摘要:
/** * 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... 阅读全文
摘要:
/** * 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... 阅读全文
摘要:
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 阅读全文