題目: 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...
題目: Given a non-negative integer x, compute and return the square root of x....
題目: Given two binary strings a and b, return their sum as a binary string. 給定兩...
題目: You are given a large integer represented as an integer array digits, where...
題目: Given a string s consisting of words and spaces, return the length of the l...
題目: Given an integer array nums, find the contiguous subarray (containing at le...
題目: Given a string s, find the length of the longest substring without repeatin...
題目: Given a sorted array of distinct integers and a target value, return the in...
題目: Given two strings needle and haystack, return the index of the first occurr...
題目: Given an integer array nums and an integer val, remove all occurrences of v...
由於前面幾題easy覺得難度還可以負荷,因此開始嘗試medium的題目 題目: You are given two non-empty linked list...
題目: Given an integer array nums sorted in non-decreasing order, remove the dupl...
題目: You are given the heads of two sorted linked lists list1 and list2. Merge...
題目: Given a string s containing just the characters '(', ')', '{', '}', '[' and...
題目: Write a function to find the longest common prefix string amongst an array...
題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...
題目: Given an integer x, return true if x is palindrome integer.An integer is a...
從今天起在此紀錄用python寫leetcode的心路歷程希望能以一天兩三題的速率下去更新讓自己的程式更加精進 題目: Given an array of i...
逃避雖可恥,但有用。但這句話恐怕在我身上行不通。每一次當我遇到問題時,我只有兩種選擇: 逃避它(消耗能量: 0 ) 面對處理它(消耗能量: ∞ max )...
思路 也是binary search的應用題,承前兩篇文章,有lb跟ub和index三個數值可選,我目前覺得應該是回傳lower bound值。 程式 c...