iT邦幫忙

leetcode相關文章
共有 1100 則文章

技術 leetcode with python:455. Assign Cookies

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

技術 leetcode with python:448. Find All Numbers Disappeared in an Array

題目: Given an array nums of n integers where nums[i] is in the range [1, n], ret...

技術 leetcode with python:441. Arranging Coins

題目: You have n coins and you want to build a staircase with these coins. The st...

技術 leetcode with python:434. Number of Segments in a String

題目: Given a string s, return the number of segments in the string. A segment...

技術 leetcode with python:415. Add Strings

題目: Given two non-negative integers, num1 and num2 represented as string, retur...

技術 leetcode with python:414. Third Maximum Number

題目: Given an integer array nums, return the third distinct maximum number in th...

技術 leetcode with python:412. Fizz Buzz

題目: Given an integer n, return a string array answer (1-indexed) where: answe...

技術 2341. Maximum Number of Pairs in Array, My C++ code is Accepted. 中文解說

Leetcode Weekly Contest 3022341. Maximum Number of Pairs in Array, My C++ code...

技術 我分享一下練習LEETCODE 撞牆期的心得

/練習 Leetcode 還是建議先看題目的解答,//*等待 Leetcode 撞牆期渡過了,再自已想解題的部份 */ version:2022070601 網...

技術 2342. Max Sum of a Pair With Equal Sum of Digits

重點在於: the sum of digits of the number nums[i] is equal to that of nums[j]. 這句英文,...

技術 leetcode with python:409. Longest Palindrome

題目: Given a string s which consists of lowercase or uppercase letters, return t...

技術 leetcode with python:405. Convert a Number to Hexadecimal

題目: Given an integer num, return a string representing its hexadecimal represen...

技術 leetcode with python:404. Sum of Left Leaves

題目: Given the root of a binary tree, return the sum of all left leaves. A lea...

技術 leetcode with python:401. Binary Watch

題目: A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 L...

技術 leetcode with python:392. Is Subsequence

題目: Given two strings s and t, return true if s is a subsequence of t, or false...

技術 leetcode with python:29. Divide Two Integers

題目: Given two integers dividend and divisor, divide two integers without using...

技術 leetcode with python:24. Swap Nodes in Pairs

好耶不知不覺就來到第100篇文了之後medium題的占比會越來越高吧慶祝一下就來繼續寫文了XD希望未來也能繼續持續下去 題目: Given a linked...

技術 leetcode with python:22. Generate Parentheses

題目: Given n pairs of parentheses, write a function to generate all combinations...

技術 leetcode with python:389. Find the Difference

題目: You are given two strings s and t. String t is generated by random shuffl...

技術 leetcode with python:19. Remove Nth Node From End of List

題目: Given the head of a linked list, remove the nth node from the end of the li...

技術 leetcode with python:387. First Unique Character in a String

題目: Given a string s, find the first non-repeating character in it and return i...

技術 leetcode with python:383. Ransom Note

題目: Given two strings ransomNote and magazine, return true if ransomNote can be...

技術 leetcode with python:18. 4Sum

題目: Given an array nums of n integers, return an array of all the unique quadru...

技術 leetcode with python:17. Letter Combinations of a Phone Number

題目: Given a string containing digits from 2-9 inclusive, return all possible le...

技術 leetcode with python:16. 3Sum Closest

題目: Given an integer array nums of length n and an integer target, find three i...

技術 leetcode with python:374. Guess Number Higher or Lower

題目: We are playing the Guess Game. The game is as follows: I pick a number fr...

技術 leetcode with python:367. Valid Perfect Square

題目: Given a positive integer num, write a function which returns True if num is...

技術 leetcode with python:350. Intersection of Two Arrays II

題目: Given two integer arrays nums1 and nums2, return an array of their intersec...

技術 leetcode with python:349. Intersection of Two Arrays

題目: Given two integer arrays nums1 and nums2, return an array of their intersec...

技術 leetcode with python:345. Reverse Vowels of a String

題目: Given a string s, reverse only all the vowels in the string and return it....