摘要: Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hello" Output: "holle" Example 2: Input: "le 阅读全文
posted @ 2019-11-09 10:22 Schwifty 阅读(133) 评论(0) 推荐(0)
摘要: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example 1: Input: a = 1, b = 2 Output: 3 Example 2: In 阅读全文
posted @ 2019-11-09 10:02 Schwifty 阅读(109) 评论(0) 推荐(0)
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input 阅读全文
posted @ 2019-11-09 09:41 Schwifty 阅读(151) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2019-11-09 05:54 Schwifty 阅读(124) 评论(0) 推荐(0)
摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2019-11-09 03:27 Schwifty 阅读(129) 评论(0) 推荐(0)