iT邦幫忙

leetcode相關文章
共有 1089 則文章

技術 LeetCode 145. Binary Tree Postorder Traversal (With Java)

附上題目連結 題目:給定一棵樹,求出透過postorder traversal的值 postorder探討:首先我們要先拜訪左邊的節點,之後拜訪右邊的節點,最後...

技術 leetcode with MySQL:182. Duplicate Emails

題目: Table: Person +-------------+---------+| Column Name | Type |+--------...

技術 leetcode with MySQL:181. Employees Earning More Than Their Managers

題目: Table: Employee +-------------+---------+| Column Name | Type |+------...

技術 leetcode with MySQL:175. Combine Two Tables

刷leetcode遇到SQL的題目,那也只能換個語言了 題目: Table: Person +-------------+---------+| Colu...

技術 leetcode with python:171. Excel Sheet Column Number

題目: Given a string columnTitle that represents the column title as appears in a...

技術 leetcode with python:169. Majority Element

題目: Given an array nums of size n, return the majority element. The majority...

技術 leetcode with python:168. Excel Sheet Column Title

題目: Given an integer columnNumber, return its corresponding column title as it...

技術 LeetCode 144. Binary Tree Preorder Traversal (With Java)

先附上題目連結 題目說明:給定一棵樹,要你用前序追蹤來儲存每個節點的值 前一篇文章有提到樹的遍歷方式有四種,這次要介紹的是前序(Preorder)的遍歷。 前序...

技術 LeetCode 94. Binary Tree Inorder Traversal (With Java)

先附上題目連結 問題說明:給定的一棵樹,透過一個List(Int型態)來儲存此樹中序的遍歷 樹的遍歷(Traversal)可以分成:1. 前序(Preorder...

技術 leetcode with python:160. Intersection of Two Linked Lists

題目: Given the heads of two singly linked-lists headA and headB, return the node...

技術 leetcode with python:155. Min Stack

題目: Design a stack that supports push, pop, top, and retrieving the minimum ele...

技術 leetcode with python:145. Binary Tree Postorder Traversal

題目: Given the root of a binary tree, return the postorder traversal of its node...

技術 leetcode with python:144. Binary Tree Preorder Traversal

題目: Given the root of a binary tree, return the preorder traversal of its nodes...

技術 leetcode with python:141. Linked List Cycle

題目: Given head, the head of a linked list, determine if the linked list has a c...

技術 leetcode with python:136. Single Number

題目: Given a non-empty array of integers nums, every element appears twice excep...

技術 leetcode with python:125. Valid Palindrome

題目: A phrase is a palindrome if, after converting all uppercase letters into lo...

技術 leetcode with python:121. Best Time to Buy and Sell Stock

題目: You are given an array prices where prices[i] is the price of a given stock...

技術 leetcode with python:119. Pascal's Triangle II

題目: Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pas...

技術 leetcode with python:118. Pascal's Triangle

題目: Given an integer numRows, return the first numRows of Pascal's triangle....

技術 leetcode with python:112. Path Sum

題目: Given the root of a binary tree and an integer targetSum, return true if th...

技術 leetcode with python:111. Minimum Depth of Binary Tree

題目: Given a binary tree, find its minimum depth. The minimum depth is the num...

技術 leetcode with python:110. Balanced Binary Tree

題目: Given a binary tree, determine if it is height-balanced. 給定一個binary tree,判...

技術 leetcode with python:108. Convert Sorted Array to Binary Search Tree

題目: Given an integer array nums where the elements are sorted in ascending orde...

技術 leetcode with python:104. Maximum Depth of Binary Tree

題目: Given the root of a binary tree, return its maximum depth. A binary tree'...

技術 leetcode with python:101. Symmetric Tree

題目: Given the root of a binary tree, check whether it is a mirror of itself (i....

技術 leetcode with python:100. Same Tree

題目: Given the roots of two binary trees p and q, write a function to check if t...

技術 leetcode with python:94. Binary Tree Inorder Traversal

題目: Given the root of a binary tree, return the inorder traversal of its nodes'...

技術 leetcode with python:88. Merge Sorted Array

題目: You are given two integer arrays nums1 and nums2, sorted in non-decreasing...

技術 leetcode with python:83. Remove Duplicates from Sorted List

題目: Given the head of a sorted linked list, delete all duplicates such that eac...

技術 leetcode with python:70. Climbing Stairs

題目: You are climbing a staircase. It takes n steps to reach the top. Each tim...