題目: Implement a last-in-first-out (LIFO) stack using only two queues. The imple...
題目: Write a function to delete a node in a singly-linked list. You will not be...
題目: Given head, the head of a linked list, determine if the linked list has a c...
題目: Given an integer n, return true if it is a power of two. Otherwise, return...
題目: Given the root of a binary tree, return its maximum depth. A binary tree'...
題目: Given the heads of two singly linked-lists headA and headB, return the node...
題目: Given a string containing digits from 2-9 inclusive, return all possible le...
題目: Given an integer array nums, return all the triplets [nums[i], nums[j], num...
題目: Given n pairs of parentheses, write a function to generate all combinations...
題目: Given an integer n, return a string array answer (1-indexed) where: answe...
題目: Given an array nums of size n, return the majority element. The majority...
題目: Implement a first in first out (FIFO) queue using only two stacks. The impl...
題目: Given an integer n, return an array ans of length n + 1 such that for each...
又一種綁特定語言的題目,幸好我之前筆電裝linux系統時有自己學過一下 題目: Given a text file file.txt that contain...
題目: The complement of an integer is the integer you get when you flip all the 0...
題目: Given a signed 32-bit integer x, return x with its digits reversed. If reve...
題目: Given a string s, find the first non-repeating character in it and return i...
題目: The Hamming distance between two integers is the number of positions at whi...
題目: Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pas...
題目: Given a text file file.txt, print just the 10th line of the file. 給定一個txt檔...
題目: Given a string s consisting of words and spaces, return the length of the l...
題目: Given an integer n, return true if it is a power of four. Otherwise, return...
題目: Given the head of a sorted linked list, delete all duplicates such that eac...
題目: Write a function that takes an unsigned integer and returns the number of '...
題目: Given an integer num, return a string representing its hexadecimal represen...
題目: Write a function that reverses a string. The input string is given as an ar...
題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...
題目: Given an integer array nums, handle multiple queries of the following type:...
題目: Given an integer array nums, return the third distinct maximum number in th...
題目: You have n coins and you want to build a staircase with these coins. The st...