摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-white 阅读全文
posted @ 2019-11-17 12:34 xuan_abc 阅读(118) 评论(0) 推荐(0)
摘要: 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 functio 阅读全文
posted @ 2019-11-17 11:57 xuan_abc 阅读(135) 评论(0) 推荐(0)
摘要: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d 阅读全文
posted @ 2019-11-17 10:00 xuan_abc 阅读(156) 评论(0) 推荐(0)
摘要: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 1 阅读全文
posted @ 2019-11-17 06:24 xuan_abc 阅读(103) 评论(0) 推荐(0)
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: 阅读全文
posted @ 2019-11-17 05:06 xuan_abc 阅读(122) 评论(0) 推荐(0)
摘要: Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assum 阅读全文
posted @ 2019-11-17 00:54 xuan_abc 阅读(178) 评论(0) 推荐(0)