11 2020 档案

摘要:Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Input: 阅读全文
posted @ 2020-11-30 17:09 diameter 阅读(78) 评论(0) 推荐(0) 编辑
摘要:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral, just two one's ad 阅读全文
posted @ 2020-11-30 15:27 diameter 阅读(94) 评论(0) 推荐(0) 编辑
摘要:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral, just two one's ad 阅读全文
posted @ 2020-11-30 13:52 diameter 阅读(102) 评论(0) 推荐(0) 编辑
摘要: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 endp 阅读全文
posted @ 2020-11-30 12:43 diameter 阅读(92) 评论(0) 推荐(0) 编辑
摘要:Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'where: '.' Matches any single character 阅读全文
posted @ 2020-11-28 18:03 diameter 阅读(108) 评论(0) 推荐(0) 编辑
摘要:Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Follow up: Could you solve it wit 阅读全文
posted @ 2020-11-26 19:23 diameter 阅读(100) 评论(0) 推荐(0) 编辑
摘要: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 @ 2020-11-25 22:40 diameter 阅读(106) 评论(0) 推荐(0) 编辑
摘要:Given a 32-bit signed integer, reverse digits of an integer. Note:Assume we are dealing with an environment that could only store integers within the 阅读全文
posted @ 2020-11-24 22:47 diameter 阅读(85) 评论(0) 推荐(0) 编辑
摘要:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2020-11-24 17:51 diameter 阅读(131) 评论(0) 推荐(0) 编辑
摘要:一、如果按字节处理,可以用struct https://docs.python.org/2/library/struct.html By default, C types are represented in the machine’s native format and byte order, a 阅读全文
posted @ 2020-11-24 10:18 diameter 阅读(5095) 评论(0) 推荐(0) 编辑
摘要:Given a string s, return the longest palindromic substring in s. Input: s = "babad"Output: "bab"Note: "aba" is also a valid answer. 方法一: 暴力法,双层循环,验证所以 阅读全文
posted @ 2020-11-20 16:40 diameter 阅读(103) 评论(0) 推荐(0) 编辑
摘要:Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity shou 阅读全文
posted @ 2020-11-17 22:17 diameter 阅读(101) 评论(0) 推荐(0) 编辑
摘要:Given a string s, find the length of the longest substring without repeating characters. Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc 阅读全文
posted @ 2020-11-08 11:44 diameter 阅读(78) 评论(0) 推荐(0) 编辑
摘要:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta 阅读全文
posted @ 2020-11-07 18:31 diameter 阅读(152) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each inp 阅读全文
posted @ 2020-11-07 15:53 diameter 阅读(119) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示