Algorithm
powerlwj
这个作者很懒,什么都没留下…
展开
-
辣鸡刘的Leetcode之旅2【最长公共前缀,有效的括号,合并链表,删除排序数组中的重复项】
Longest Common Prefix 2. 最长公共前缀 问题描述: 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 ” “. 编写一个函数来查...原创 2018-08-26 20:32:40 · 249 阅读 · 0 评论 -
辣鸡刘的LeetCode之旅-1 [two Sum算法,反转整数算法,回文数,罗马数转整数]
从今天开始,辣鸡刘学习一下搞搞算法,确定了leetcode网站,从最简单的开始学习和思考。 入门算法, 1. Two Sum 描述: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that ea...原创 2018-08-20 21:44:36 · 207 阅读 · 0 评论 -
辣鸡刘的Leetcode之旅3(SQL Part)【两表合并查询,第二高薪,挣钱比经理多, 重复值查询】
1. 两表合并查询(Combine Two Tables) 题目描述: Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | v...原创 2018-09-01 20:55:19 · 247 阅读 · 0 评论 -
辣鸡刘的Leetcode之旅4 (Weekly Contest 100)【单调序列,】
Monotonic Array 题目描述: An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A[j]. An array A is mono...原创 2018-09-04 14:22:16 · 200 阅读 · 0 评论 -
辣鸡刘的Leetcode之旅6【移除元素, 实现strStr() ,寻找插入的位置,最长无重复子串, 最长回文字符 】
27. Remove Element 题目描述: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this ...原创 2018-09-05 16:14:57 · 240 阅读 · 0 评论 -
辣鸡刘的Leetcode之旅7【Length of Last Word,Maximum Subarray,count-and-say,Plus One】
58. Length of Last Word 题目描述: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist...原创 2018-09-15 22:38:17 · 209 阅读 · 0 评论 -
辣鸡刘的Leetcode之旅8【Add Binary,Sqrt(x),Merge Sorted Array】
Add Binary 题目描述; Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1: Input: a = "11", b = "原创 2018-09-23 20:46:36 · 269 阅读 · 0 评论