原创 【LeetCode】Course Schedule--拓撲排序
【題目】 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisi
原创 leetcode-- Maximmum Product of Three Numbers
628. Maximmum Product of Three Numbers Question Editorial Solution Question Given an integer array, find th
原创 Median of Two Sorted Array leetcode java
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The ov
原创 兩個棧實現一個隊列和兩個隊列實現一個棧
兩個棧實現一個隊列 import java.util.Stack; public class Demo07 { Stack<Integer> stack1 = new Stack<Integer>(); Sta
原创 [Leetcode] Lowest Common Ancestor of a Binary Tree 最小公共祖先
Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ance
原创 MergeSort與QuickSort
快排 public class QuickSortTest { private int array[]; private int length; public void sort(int[] inputA