iT邦幫忙

刷題相關文章
共有 162 則文章

技術 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...

技術 leetcode with python:69. Sqrt(x)

題目: Given a non-negative integer x, compute and return the square root of x....

技術 leetcode with python:67. Add Binary

題目: Given two binary strings a and b, return their sum as a binary string. 給定兩...

技術 leetcode with python:66. Plus One

題目: You are given a large integer represented as an integer array digits, where...

技術 leetcode with python:58. Length of Last Word

題目: Given a string s consisting of words and spaces, return the length of the l...

技術 leetcode with python:53. Maximum Subarray

題目: Given an integer array nums, find the contiguous subarray (containing at le...

技術 leetcode with python:3. Longest Substring Without Repeating Characters

題目: Given a string s, find the length of the longest substring without repeatin...

技術 leetcode with python:35. Search Insert Position

題目: Given a sorted array of distinct integers and a target value, return the in...

技術 leetcode with python:28. Implement strStr()

題目: Given two strings needle and haystack, return the index of the first occurr...

技術 leetcode with python:27. Remove Element

題目: Given an integer array nums and an integer val, remove all occurrences of v...

技術 leetcode with python:2. Add Two Numbers

由於前面幾題easy覺得難度還可以負荷,因此開始嘗試medium的題目 題目: You are given two non-empty linked list...

技術 leetcode with python:26. Remove Duplicates from Sorted Array

題目: Given an integer array nums sorted in non-decreasing order, remove the dupl...

技術 leetcode with python:21. Merge Two Sorted Lists

題目: You are given the heads of two sorted linked lists list1 and list2. Merge...

技術 leetcode with python:20. Valid Parentheses

題目: Given a string s containing just the characters '(', ')', '{', '}', '[' and...

技術 leetcode with python:14. Longest Common Prefix

題目: Write a function to find the longest common prefix string amongst an array...

技術 leetcode with python:13. Roman to Integer

題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...

技術 leetcode with python:9. Palindrome Number

題目: Given an integer x, return true if x is palindrome integer.An integer is a...