随笔分类 -  Algorithms

with java javascript c++
Leetcode---2. Add Two Numbers
摘要: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 contai 阅读全文

posted @ 2018-06-24 11:55 Hugh_Sun 阅读(132) 评论(0) 推荐(0)

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 each input would have ex 阅读全文

posted @ 2018-06-24 09:56 Hugh_Sun 阅读(123) 评论(0) 推荐(0)

Leetcode---35. Search Insert Position
摘要:Description: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were i 阅读全文

posted @ 2017-10-22 10:09 Hugh_Sun 阅读(154) 评论(0) 推荐(0)

Leetcode---21. Merge Two Sorted Lists
摘要:Description: Merge 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 li 阅读全文

posted @ 2017-07-13 23:27 Hugh_Sun 阅读(106) 评论(0) 推荐(0)

Leetcode----26. Remove Duplicates from Sorted Array
摘要:Description Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate ex 阅读全文

posted @ 2017-07-08 10:22 Hugh_Sun 阅读(108) 评论(0) 推荐(0)

Leetcode---28. Implement strStr()
摘要:Description Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Solution htt 阅读全文

posted @ 2017-07-08 08:05 Hugh_Sun 阅读(124) 评论(0) 推荐(0)

Leetcode----27 Remove Element
摘要:Description Given 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 阅读全文

posted @ 2017-07-08 06:45 Hugh_Sun 阅读(134) 评论(0) 推荐(0)

导航