摘要:
题目: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess 阅读全文
摘要:
题目: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 链接: https 阅读全文
摘要:
题目: Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library fun 阅读全文
摘要:
题目: Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed 阅读全文
摘要:
题目: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each el 阅读全文
摘要:
题目: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each eleme 阅读全文
摘要:
题目: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example, 链接: https://leetcod 阅读全文
摘要:
题目: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Give 阅读全文
摘要:
Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 链接:https://leetcode.com/prob 阅读全文
摘要:
题目 Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Given num = 16, return true. Given num = 5, return 阅读全文