附上題目連結 題目:給定一棵樹,求出透過postorder traversal的值 postorder探討:首先我們要先拜訪左邊的節點,之後拜訪右邊的節點,最後...
題目: Table: Person +-------------+---------+| Column Name | Type |+--------...
題目: Table: Employee +-------------+---------+| Column Name | Type |+------...
刷leetcode遇到SQL的題目,那也只能換個語言了 題目: Table: Person +-------------+---------+| Colu...
題目: Given a string columnTitle that represents the column title as appears in a...
題目: Given an array nums of size n, return the majority element. The majority...
題目: Given an integer columnNumber, return its corresponding column title as it...
先附上題目連結 題目說明:給定一棵樹,要你用前序追蹤來儲存每個節點的值 前一篇文章有提到樹的遍歷方式有四種,這次要介紹的是前序(Preorder)的遍歷。 前序...
先附上題目連結 問題說明:給定的一棵樹,透過一個List(Int型態)來儲存此樹中序的遍歷 樹的遍歷(Traversal)可以分成:1. 前序(Preorder...
題目: Given the heads of two singly linked-lists headA and headB, return the node...
題目: Design a stack that supports push, pop, top, and retrieving the minimum ele...
題目: Given the root of a binary tree, return the postorder traversal of its node...
題目: Given the root of a binary tree, return the preorder traversal of its nodes...
題目: Given head, the head of a linked list, determine if the linked list has a c...
題目: Given a non-empty array of integers nums, every element appears twice excep...
題目: A phrase is a palindrome if, after converting all uppercase letters into lo...
題目: You are given an array prices where prices[i] is the price of a given stock...
題目: Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pas...
題目: Given an integer numRows, return the first numRows of Pascal's triangle....
題目: Given the root of a binary tree and an integer targetSum, return true if th...
題目: Given a binary tree, find its minimum depth. The minimum depth is the num...
題目: Given a binary tree, determine if it is height-balanced. 給定一個binary tree,判...
題目: Given an integer array nums where the elements are sorted in ascending orde...
題目: Given the root of a binary tree, return its maximum depth. A binary tree'...
題目: Given the root of a binary tree, check whether it is a mirror of itself (i....
題目: Given the roots of two binary trees p and q, write a function to check if t...
題目: Given the root of a binary tree, return the inorder traversal of its nodes'...
題目: You are given two integer arrays nums1 and nums2, sorted in non-decreasing...
題目: Given the head of a sorted linked list, delete all duplicates such that eac...
題目: You are climbing a staircase. It takes n steps to reach the top. Each tim...