14 Felomeng

Google - 高级软件工程师



TA的排名 2k+



2020-03-06 11:46:38

LeetCode Java First 400 题解-034

Search for a Range MediumGiven an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the o...

2019-11-20 13:08:55

LeetCode Java First 400 题解-033

Search in Rotated Sorted Array MediumSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are giv...

2019-11-20 13:05:32

LeetCode Java First 400 题解-032

Longest Valid Parentheses HardGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest valid pa...

2019-11-19 13:27:01

LeetCode Java First 400 题解-031

Next Permutation MediumImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange...

2019-11-18 11:57:45

LeetCode Java First 400 题解-030

Substring with Concatenation of All Words HardYou are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a conc...

2019-11-01 06:44:04

LeetCode Java First 400 题解-029

Divide Two Integers MediumDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.public int divide(int dividend, int divisor) { if...

2019-11-01 06:43:25

LeetCode Java First 400 题解-028

Implement strStr()EasyImplement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.public int strStr(String haystack, String ne...

2019-11-01 06:42:51

LeetCode Java First 400 题解-027

Remove Element EasyGiven an array and a value, 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 in place wit...

2019-11-01 06:42:20

LeetCode Java First 400 题解-026

Remove Duplicates from Sorted Array EasyGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for an...

2019-11-01 06:41:43

LeetCode Java First 400 题解-025

Reverse Nodes in k-Group HardGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.kis a positive integer and is less than or equal to the length of ...

2019-11-01 06:41:04

LeetCode Java First 400 题解-024

Swap Nodes in Pairs MediumGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your...

2019-11-01 06:39:24

LeetCode Java First 400 题解-023

Merge k Sorted Lists HardMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.public ListNode mergeKLists(ListNode[] lists) { if (lists == nul...

2019-11-01 06:38:46

LeetCode Java First 400 题解-022

Generate Parentheses MediumGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:[ "((()))", ...

2019-11-01 06:38:15

LeetCode Java First 400 题解-021

Merge Two Sorted Lists EasyMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.public ListNode mergeTwo...

2019-11-01 06:37:41

LeetCode Java First 400 题解-020

Valid Parentheses EasyGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct order,"()"an...

2019-10-30 00:29:38

LeetCode Java First 400 题解-019

Remove Nth Node From End of List MediumGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = ...

2019-10-30 00:28:41

LeetCode Java First 400 题解-018

4Sum MediumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of target.Note:...

2019-10-30 00:27:46

LeetCode Java First 400 题解-017

Letter Combinations of a Phone Number MediumGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telepho...

2019-10-30 00:26:34

LeetCode Java First 400 题解-016

3Sum Closest MediumGiven an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each ...

2019-10-30 00:24:10


  • 博客专家
勋章 我的勋章
  • 专栏达人
  • 持之以恒
  • 勤写标兵Lv4
  • 分享王者