題目: Given a positive integer num, write a function which returns True if num is...
題目: Given two integer arrays nums1 and nums2, return an array of their intersec...
題目: Given two integer arrays nums1 and nums2, return an array of their intersec...
題目: Given a string s, reverse only all the vowels in the string and return it....
題目: Write a function that reverses a string. The input string is given as an ar...
題目: Given an integer n, return true if it is a power of four. Otherwise, return...
題目: Given an integer n, return an array ans of length n + 1 such that for each...
題目: Given an integer array nums, return all the triplets [nums[i], nums[j], num...
題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...
題目: You are given an integer array height of length n. There are n vertical lin...
題目: Implement the myAtoi(string s) function, which converts a string to a 32-bi...
題目: Given an integer n, return true if it is a power of three. Otherwise, retur...
題目: Given an integer array nums, handle multiple queries of the following type:...
題目: You are playing the following Nim Game with your friend: Initially, there...
題目: Given a pattern and a string s, find if s follows the same pattern. Here...
題目: Given an integer array nums, move all 0's to the end of it while maintainin...
題目: You are a product manager and currently leading a team to develop a new pro...
題目: Given a signed 32-bit integer x, return x with its digits reversed. If reve...
題目: Given an array nums containing n distinct numbers in the range [0, n], retu...
題目: An ugly number is a positive integer whose prime factors are limited to 2,...
題目: Given an integer num, repeatedly add all its digits until the result has on...
題目: Given the root of a binary tree, return all root-to-leaf paths in any order...
題目: The string "PAYPALISHIRING" is written in a zigzag pattern on a g...
題目: Given a string s, return the longest palindromic substring in s. 給定一個字串,找出...
題目: Given two strings s and t, return true if t is an anagram of s, and false o...
題目: Write a function to delete a node in a singly-linked list. You will not be...
題目: Given a binary search tree (BST), find the lowest common ancestor (LCA) of...
題目: Given the head of a singly linked list, return true if it is a palindrome....
題目: Implement a first in first out (FIFO) queue using only two stacks. The impl...
題目: Given an integer n, return true if it is a power of two. Otherwise, return...