Longest Increasing Subsequence

作者:sryan 更新时间:2018-07-19 11:02 分类:数据结构与算法

这题我做的时候用了动态规划,但是也只是能满足时间复杂度小于O(N2),先看下题目 Given an unsorted array of integers, find the length of lon...

点击数:879 回复数:0

Bulls and Cows

作者:sryan 更新时间:2018-07-19 10:37 分类:数据结构与算法

You are playing the following Bulls and Cows game with your friend: You write down a number and ask ...

点击数:896 回复数:0

Single Number III

作者:sryan 更新时间:2018-07-18 16:02 分类:数据结构与算法

又是一道single number题目,这类题目一般都是依赖位操作,先给出题目: Given an array of numbers nums , in which exactly two eleme...

点击数:770 回复数:0

Different Ways to Add Parentheses

作者:sryan 更新时间:2018-07-18 15:27 分类:数据结构与算法

一道初看上去有点儿难度的题目,其实想明白了也不算太难。首先上题目: Given a string of numbers and operators, return all possible resul...

点击数:816 回复数:0

2.10.23发布了!

作者:sryan 更新时间:2018-08-31 12:06 分类:backmir

该文章为私密文章

点击数:1915 回复数:6

Find Minimum in Rotated Sorted Array

作者:sryan 更新时间:2018-07-05 14:26 分类:数据结构与算法

先看题目: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand....

点击数:763 回复数:0

Maximum Product Subarray

作者:sryan 更新时间:2018-07-05 10:19 分类:数据结构与算法

这题和Maximum subarray很相似,一看到就想到是一个DP问题,首先给出题目: Given an integer array nums , find the contiguous subar...

点击数:830 回复数:0

深入Linux内核架构(1)

作者:sryan 更新时间:2018-07-04 11:05 分类:操作系统

从昨晚开始开始断断续续读这本书了。在刚毕业的那时候读过windows核心编程,里面也有不少内核的知识,但是那本书偏重windows以及编码,对操作系统的实现涉及不多,今年反正是充电的一年,leetco...

点击数:1051 回复数:0

Insertion Sort List

作者:sryan 更新时间:2018-07-04 10:26 分类:数据结构与算法

一道在链表上进行插入排序的题目,假设在数组上,插入排序的写法不难,但是数据结构改为链表,还是有点儿麻烦的。首先看下题目: Sort a linked list using insertion sort...

点击数:856 回复数:0

Word Break

作者:sryan 更新时间:2018-07-03 16:49 分类:数据结构与算法

又是一道动态规划的题目,当然个人感觉不那么明显,但是也有递推的逻辑存在。 Given a non-empty string s and a dictionary wordDict containing...

点击数:787 回复数:0