自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

转载 Lintcode45 Maximum Subarray Difference solution 题解

【题目描述】 Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the largest difference. Notice:The subarray should contain at leas

2017-05-07 18:26:09 411

转载 Lintcode44 Minimum Subarray solution 题解

【题目描述】 Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray. Notice:The subarray should contain one integer at least. 给定一个整数数组,找到一个具有最小和的子数组。返回其最小和

2017-05-07 18:25:31 349

转载 Lintcode43 Maximum Subarray III solution 题解

【题目描述】 Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the largest sum. Notice:Th

2017-05-07 18:09:27 612

转载 Lintcode42 Maximum Subarray II solution 题解

【题目描述】 Given an array of integers, find two non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the largest sum. Notice:The subarray sh

2017-05-05 16:19:28 800

转载 转专业进搜狐经验分享

本人非计算机专业,老实说,专业与程序员八竿子打不着。某211的会计专业,转型成为技术型人才纯属兴趣。在某会计事务所实习过三个月,感觉还是不适合自己,便想试试去做计算机工程。我高中时学过计算机竞赛,拿了个全国三等,填专业时便选了大热的金融。过了三年又抓起老本行,那些算法很陌生了,数据库数据结构都没学过,去学习也是挺困难,自我感觉与没基础的人比没有什么优势。可巧,身边的朋友(不同专业)也有这个想法。便

2017-05-02 14:17:11 664

转载 Lintcode40 Implement Queue by Two Stacks solution 题解

【题目描述】 As the title described, you should only use two stacks to implement a queue's actions.The queue should support push(element), pop() and top() where pop is pop the first(a.k.a front) elemen

2017-05-01 10:04:10 324

转载 Lintcode35 Reverse Linked List solution 题解

【题目描述】 Reverse a linked list. 翻转一个链表 【题目链接】 http://www.lintcode.com/en/problem/reverse-linked-list/ 【题目解析】 这题要求我们翻转[m, n]区间之间的链表。对于链表翻转来说,几乎都是通用的做法,譬如p1 -> p2 -> p3 -> p4,如果我们要翻转p2和p3,其实

2017-04-30 10:11:42 245

转载 Lintcode38 Search a 2D Matrix II solution 题解

【题目描述】 Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it. This matrix has the following properties:Integers in each row are sorted from l

2017-04-30 10:07:30 242

转载 Lintcode36 Reverse Linked List II solution 题解

【题目描述】 Reverse a linked list from position m to n. Notice:Given m, n satisfy the following condition: 1 ≤ m ≤ n ≤ length of list. 翻转链表中第m个节点到第n个节点的部分 注意:m,n满足1 ≤ m ≤ n ≤ 链表长度 【题目链接】

2017-04-29 09:29:33 334

转载 Lintcode35 Reverse Linked List solution 题解

【题目描述】 Reverse a linked list. 翻转一个链表 【题目链接】 http://www.lintcode.com/en/problem/reverse-linked-list/ 【题目解析】 这题要求我们翻转[m, n]区间之间的链表。对于链表翻转来说,几乎都是通用的做法,譬如p1 -> p2 -> p3 -> p4,如果我

2017-04-27 17:07:00 340

转载 Lintcode34 N-Queens II solution 题解

【题目描述】 Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions. 根据n皇后问题,现在返回n皇后不同的解决方案的数量而不是具体的放置布局。 【题目链接】 http://www.

2017-04-25 12:37:32 320

转载 Lintcode33 N-Queens solution 题解

【题目描述】 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzz

2017-04-24 09:38:52 469

转载 Lintcode32 Minimum Window Substring solution 题解

【题目描述】 Given a string source and a string target, find the minimum window in source which will contain all the characters in target. Notice:If there is no such window in source that covers a

2017-04-23 21:23:18 386

转载 Lintcode31 Partition Array solution题解

【题目描述】 Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that:All elements = k are moved to the right;Return the partitioning index, i.e the

2017-04-23 21:22:05 465

翻译 Lintcode30 Insert Interval solution 题解

【题目描述】 Given a non-overlapping interval list which is sorted by start point.Insert a new interval into it, make sure the list is still in order and non-overlapping (merge intervals if necessary).

2017-04-23 21:20:42 559

转载 Lintcode29 Interleaving String solution 题解

【题目描述】 Given three strings: s1, s2, s3, determine whether s3 is formed by the interleaving of s1 and s2. 给出三个字符串:s1、s2、s3,判断s3是否由s1和s2交叉构成。 【题目链接】 http://www.lintcode.com/en/problem/

2017-04-22 22:27:47 521

转载 Lintcode28 Search a 2D Matrix solution 题解

【题目描述】 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first intege

2017-04-22 22:25:40 278

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除