iT邦幫忙

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

技術 leetcode with python:225. Implement Stack using Queues

題目: Implement a last-in-first-out (LIFO) stack using only two queues. The imple...

技術 leetcode with python:237. Delete Node in a Linked List

題目: Write a function to delete a node in a singly-linked list. You will not be...

技術 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:231. Power of Two

題目: Given an integer n, return true if it is a power of two. Otherwise, return...

技術 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:160. Intersection of Two Linked Lists

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

技術 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:15. 3Sum

題目: Given an integer array nums, return all the triplets [nums[i], nums[j], num...

技術 leetcode with python:22. Generate Parentheses

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

技術 leetcode with python:412. Fizz Buzz

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

技術 leetcode with python:169. Majority Element

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

技術 leetcode with python:232. Implement Queue using Stacks

題目: Implement a first in first out (FIFO) queue using only two stacks. The impl...

技術 leetcode with python:338. Counting Bits

題目: Given an integer n, return an array ans of length n + 1 such that for each...

技術 leetcode with Bash:193. Valid Phone Numbers

又一種綁特定語言的題目,幸好我之前筆電裝linux系統時有自己學過一下 題目: Given a text file file.txt that contain...

技術 leetcode with python:476. Number Complement

題目: The complement of an integer is the integer you get when you flip all the 0...

技術 leetcode with python:7. Reverse Integer

題目: Given a signed 32-bit integer x, return x with its digits reversed. If reve...

技術 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:461. Hamming Distance

題目: The Hamming distance between two integers is the number of positions at whi...

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

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

技術 leetcode with Bash:195. Tenth Line

題目: Given a text file file.txt, print just the 10th line of the file. 給定一個txt檔...

技術 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:342. Power of Four

題目: Given an integer n, return true if it is a power of four. Otherwise, return...

技術 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:191. Number of 1 Bits

題目: Write a function that takes an unsigned integer and returns the number of '...

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

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

技術 leetcode with python:344. Reverse String

題目: Write a function that reverses a string. The input string is given as an ar...

技術 leetcode with python:13. Roman to Integer

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

技術 leetcode with python:303. Range Sum Query - Immutable

題目: Given an integer array nums, handle multiple queries of the following type:...

技術 leetcode with python:414. Third Maximum Number

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

技術 leetcode with python:441. Arranging Coins

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