摘要:
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the tw... 阅读全文
摘要:
‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element.The matching should cover the entire input string (not pa... 阅读全文
摘要:
easy 21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together t... 阅读全文
摘要:
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.思路:先构造罗马与数字的映射,接着对给定的字符串从头开始进行最长匹配,... 阅读全文
摘要:
回文数的判定,不使用额外的空间 Determine whether an integer is a palindrome. Do this without extra space.思路:将一个整数逆转,判定和原来的数相不相等 注意负数一定不是回文数#define IMAX nume... 阅读全文