摘要:
Problem: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or 阅读全文
摘要:
problem: There are two sorted arrays nums1 and nums2 of size m and n respectively. 有两个排序好的数列num1和num大小为m和n Find the median of the two sorted arrays. T 阅读全文
摘要:
problem: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 给定一个数字,输出正确匹配括号的所有组合 For example, giv 阅读全文
摘要:
problem: Write a function to find the longest common prefix string amongst an array of strings. 最长公共前缀 没啥太大问题,只是有两个小坑 input:["这是一个字符串"] output:"这是一个字符 阅读全文
摘要:
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 阅读全文
摘要:
这题很有意思,算是一个字符串的重新排列,将字符串按照z的形状进行排列后再逐行进行输出 Problem: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (y 阅读全文
摘要:
今天做一道最长回文子串问题 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 给定字符串s,找到其最长回文子串并输出 阅读全文
摘要:
今天开始刷leetcode,进行一个记录,写的比较简陋,见谅 Longest Substring Without Repeating Characters Question: Given a string, find the length of the longest substring witho 阅读全文