随笔分类 - LeetCode
LeetCode上的一些小算法题
    
摘要:Write a function to find the longest common prefix string amongst an array of strings. []=>""["abcweed","htgdabc","sabcrf"]=>""["abcweed","abhtgdc","a
        阅读全文
            
摘要:Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 题目大意:把罗马数字转换成的整数 遍历每个字符,前一个字符比后一个字符小,相减
        阅读全文
            
摘要:Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 题目大意:把一个整数转换成罗马数字
        阅读全文
            
摘要: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 two endpo
        阅读全文
            
摘要:Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding elemen
        阅读全文
            
摘要:Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi
        阅读全文
            
摘要:Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 
        阅读全文
            
摘要:Reverse digits of an integer. If the integer's last digit is 0, what should the output be? ie, cases such as 10, 100.Did you notice that the reversed 
        阅读全文
            
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes
        阅读全文
            
摘要:There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh
        阅读全文
            
摘要:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo
        阅读全文
            
摘要:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 
        阅读全文
            
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号