原创 54 Minimum Number of Steps to Make Two Strings Anagram

題目 Given two equal-size strings s and t. In one step you can choose any character of t and replace it with another

原创 41 Group the People Given the Group Size They Belong To

題目 There are n people whose IDs go from 0 to n - 1 and each person belongs exactly to one group. Given the array gr

原创 45 Increasing Decreasing String

題目 Given a string s. You should re-order the string using the following algorithm: Pick the smallest character from

原创 51 Sort the Matrix Diagonally

題目 分析 題意:給一個m*n矩陣,按對角線進行升序排序。 將矩陣下標標出來 解題關鍵在於如何找到“對角線”。 我們人是可以直觀看出來的,但是計算機不能。 通過觀察發現,對角線的元素必有:i-j相同。 根據這個特性,實現對角遍

原创 前後分離 redis實現單用戶登錄限制(用戶僅可以在一處登錄)

token設計: username+”,”+userId+”,”+IP+”,”+loginTime redis存儲K-V: key:username+”,”+id value: ip+”,”+loginTime 登錄實現

原创 59 大數加法

leetcode上不了,做一下牛客網的 題目 以字符串的形式讀入兩個數字,再以字符串的形式輸出兩個數字的和。 輸入描述: 輸入兩行,表示兩個數字a和b,-109 <= a , b <= 109 ,用雙引號括起。 輸出描述:

原创 48 Insert into a Binary Search Tree

題目 Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value int

原创 50 Maximum Binary Tree

題目 Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root

原创 46 Count Negative Numbers in a Sorted Matrix

題目 Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise. Return the numb

原创 53 Lucky Numbers in a Matrix

題目 Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is

原创 56 Height Checker

題目 Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of

原创 【JUnit】Java單元測試

JUnit1. 測試流程2. JUnit3. Junit生命週期4. 異常測試5. 參數化測試5. 超時測試6. springboot中的測試自動化測試 1. 測試流程 2. JUnit 相關術語: TestCase:表示

原创 44 Binary Search Tree to Greater Sum Tree

題目 Given the root of a binary search tree with distinct values, modify it so that every node has a new value equal

原创 Java高併發與多線程網絡編程

目錄1. 線程介紹2. 創建並啓動線程3. 函數式接口編程4. Thread 構造器5. 守護線程線程關係6. join7. interrupt8. 優雅的結束線程9. 線程安全、數據共享synchronized核心10. 死鎖1

原创 Java8 新特性--Lambda&函數式接口&雙冒號引用&Stream

目錄前言1. Lambda2. 函數式接口3. 方法引用與構造器引用4. Stream5. 接口中的默認方法與靜態方法6. 新時間日期API7. 其他新特性 前言 哈希表在Java中應用非常多 1.8以前,HashMap爲數組-