iT邦幫忙

leetcode相關文章
共有 1089 則文章

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

技術 leetcode with python:1. Two Sum

從今天起在此紀錄用python寫leetcode的心路歷程希望能以一天兩三題的速率下去更新讓自己的程式更加精進 題目: Given an array of i...

技術 Day 6, Leetcode problem 1: Two Sum, C++

逃避雖可恥,但有用。但這句話恐怕在我身上行不通。每一次當我遇到問題時,我只有兩種選擇: 逃避它(消耗能量: 0 ) 面對處理它(消耗能量: ∞ max )...

技術 Leetcode (Algorithm I): 5. Search Insert Position

思路 也是binary search的應用題,承前兩篇文章,有lb跟ub和index三個數值可選,我目前覺得應該是回傳lower bound值。    程式 c...

技術 Leetcode: 278. First Bad Version

思路 呼叫API的次數越少越好,因為不確定錯誤會是在前面一點的版本出現,還是後面一點的版本出現,因此最好從中間的版本切入,如果該版本回傳結果為有錯誤的版本,則繼...

技術 LeetCode 955. Delete Columns to Make Sorted II

Delete Columns to Make Sorted II Medium You are given an array of n strings...

技術 LeetCode 6. Zigzag Conversion

Zigzag Conversion Medium The string "PAYPALISHIRING" is written in...

鐵人賽 Software Development DAY 30

技術 Day 30:結束後的下一步

回顧 & 總結 今天是最後一天了,來回顧一下這些日子分享及學習的內容,雖然是寫LeetCode的題目為主,但在過程中每天的題目是有選過主題的,一天一天都...

鐵人賽 Software Development DAY 29

技術 Day 29:653. Two Sum IV - Input is a BST

今日題目 題目連結:653. Two Sum IV - Input is a BST 題目主題:Hash Table, Two Pointers, Tree,...

鐵人賽 Software Development DAY 29

技術 [29] 用 python 刷 Leetcode: 404

原始題目 Given the root of a binary tree, return the sum of all left leaves. Example...

鐵人賽 Software Development DAY 28

技術 [28] 用 python 刷 Leetcode: 1013

原始題目 Given an array of integers arr, return true if we can partition the array i...

鐵人賽 Software Development DAY 28

技術 Day 28:1. Two Sum

今日題目 題目連結:1. Two Sum 題目主題:Array, Hash Table 簡單說說 Hash Table Hash Table 主要的核心概念是...

鐵人賽 Software Development DAY 27

技術 [27] 用 python 刷 Leetcode: 455

原始題目 Assume you are an awesome parent and want to give your children some cookie...

鐵人賽 Software Development DAY 26

技術 [26] 用 python 刷 Leetcode: 150 evaluate reverse polish notatio

原始題目 Evaluate the value of an arithmetic expression in Reverse Polish Notation....

鐵人賽 Software Development DAY 26

技術 Day 26:53. Maximum Subarray (2)

今日題目 題目連結:53. Maximum Subarray 題目主題:Array, Divide and Conquer, Dynamic Programmi...