自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 Lintcode104 Merge k Sorted Lists solution 题解

【题目描述】Mergeksorted linked lists and return it as one sorted list.Analyze and describe its complexity.合并k个排序链表,并且返回合并后的排序链表。尝试分析和描述其复杂度。【题目链接】www.lintcode.com/en/problem/merge-k-sorted-li

2017-08-10 21:51:29 390

转载 Lintcode103 Linked List Cycle || solution 题解

【题目描述】Given a linked list, return the node where the cycle begins.If there is no cycle, returnnull.给定一个链表,如果链表中存在环,则返回到链表中环的起始节点的值,如果没有环,返回null。【题目链接】www.lintcode.com/en/problem/linked-l

2017-08-09 21:03:13 516

转载 Lintcode102 Linked List Cycle solution 题解

【题目描述】Given a linked list, determine if it has a cycle in it.给定一个链表,判断它是否有环。【题目链接】www.lintcode.com/en/problem/linked-list-cycle/【题目解析】可以使用两个指针,一快一慢,如果有环,则这两个指针一定会相遇。这个方法不需要额外的空间,同时复杂度是

2017-08-08 23:19:38 345

转载 Snapchat 面经(电面+onsite)

在网上投了简历,一周后收到面试通知。面试是在 Snapchat LA 总部面的,公司环境很好,可以看到海景。另外,面试报销机票、住宿的所有费用。平常在大农村住久了,这次就当去 LA 玩一下。整个面试过程包括一场电面和四场onsite。电面1电面比较轻松,先是自我介绍,然后问了一些我简历上的项目问题。因为这一部分可以提前准备,所以表现的比较好。另外还问了一道Lintcode上

2017-08-08 23:17:58 982

转载 Lintcode101 Remove Duplicates From Sorted Array || solution 题解

【题目描述】Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should return length =5, and A is now[1,

2017-08-06 00:30:33 319

转载 Lintcode100 Remove Duplicates From Sorted Array solution 题解

【题目描述】Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in

2017-08-04 22:31:16 281

转载 Lintcode99 Reorder List solution

【题目描述】Given a singly linked list L: L0→ L1→ … → Ln-1→ Lnreorder it to: L0→ Ln→ L1→ Ln-1→ L2→ Ln-2→ …给定一个单链表L:L0→L1→…→Ln-1→Ln,重新排列后为:L0→Ln→L1→Ln-1→L2→Ln-2→…必须在不改变节点值的情况下进行原地操作。【题目链接】w

2017-08-03 17:25:42 2560

转载 Lintcode98 Sort List solution 题解

【题目描述】Sort a linked list in O(nlogn) time using constant space complexity.在O(nlogn) 时间复杂度和常数级的空间复杂度下给链表排序。【题目链接】www.lintcode.com/en/problem/sort-list/【题目解析】此题可以归并排序。以下归并排序实现的几个要素。1.按

2017-08-02 22:57:18 284

转载 Lintcode97 Maximum Depth Of BinaryTree solution 题解

【题目描述】Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.给定一个二叉树,找出其最大深度。二叉树的深度为根

2017-08-01 22:48:42 245

转载 Lintcode96 Partition List solution题解

【题目描述】Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes

2017-07-28 14:56:39 298

转载 Lintcode95 Validate Binary Search Tree solution 题解

【题目描述】Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:·The left subtree of a node contains only nodes with keysless thanthe node's

2017-07-27 13:55:39 393

转载 程序员常用的刷题网站

1、LintcodeLintcode.com——LintCode网站是国内较大的在线编程&测评网站。此网站提供各大IT公司的算法面试题类型,行分门别类,由简单到中等,再到难,便于不同水平的程序员进行刷题练习。同时网站支持多种语言(Java, Python, C++),方便不同语言特长的程序员利用擅长语言进行刷题练习。因此对于不同编程能力水平、不同职位需求的人来说都是非常有用的刷题网站。

2017-07-26 18:20:40 104470 6

转载 Lintcode94 Binary Tree Maximum Path Sum solution 题解

【题目描述】给出一棵二叉树,寻找一条路径使其路径和最大,路径可以在任一节点中开始和结束(路径和为两个节点之间所在路径上的节点权值之和)。Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.【题目链接】www.lintcode.c

2017-07-26 17:56:42 374

转载 Lintcode93 Balanced Binary Tree solution 题解

【题目描述】Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node n

2017-07-26 10:42:56 341

转载 Lintcode92 Backpack solution 题解

【题目描述】Givennitems with size Ai, an integermdenotes the size of a backpack. How full you can fill this backpack?在n个物品中挑选若干物品装入背包,最多能装多满?假设背包的大小为m,每个物品的大小为A[i]【注】:你不可以将物品进行切割。【题目链接】www.lin

2017-07-25 13:21:44 569

转载 Lintcode91 Minimum Adjustment Cost solution 题解

【题目描述】Given an integer array, adjust each integers so that the difference of every adjacent integers are not greater than a given number target.If the array before adjustment isA, the array af

2017-07-21 23:44:28 301

转载 Lintcode90 K Sum || solution 题解

【题目描述】Given n unique integers, number k (1Find all possible k integers where their sum is target.给定n个不同的正整数,整数k(1在这n个数里面找出K个数,使得这K个数的和等于目标数字,你需要找出所有满足要求的方案。【题目链接】www.lintcode.com/en/pr

2017-07-20 21:06:03 452

转载 Lintcode89 K Sum solution 题解

【题目描述】Givenndistinct positive integers, integerk(kFindknumbers where sum is target. Calculate how many solutions there are?给定n个不同的正整数,整数k(k 在这n个数里面找出K个数,使得这K个数的和等于目标数字,求问有多少种方案?【题目链接】w

2017-07-19 18:21:59 412

转载 Lintcode88 Lowest Common Ancestor solution 题解

【题目描述】Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes.The lowest common ancestor is the node with largest depth which is the ancestor of bo

2017-07-19 00:11:10 265

转载 Lintcode87 Remove Node In Binary Search Treesolution 题解

【题目描述】Given a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no such a node with given value in the binary search tree, do nothing. You

2017-07-17 22:16:16 274

转载 微软SDE面经(电面+onsite)

本人工作1年多了,正在准备跳槽中。刚刚参加完微软西雅图的面试,来分享一下自己的面试过程。一共7轮面试,其中1轮电面,6轮Onsite。第一轮 电面1第一轮是电面,先是让自我介绍,然后根据简历提了几个问题之后,就直接开始上题了。给出一个字符串(假设长度最长为1000),求出它的最长回文子串,你可以假定只有一个满足条件的最长回文子串。LintCode原题:http://

2017-05-23 23:23:52 539

转载 微软SDE面经(电面+onsite)

本人工作1年多了,正在准备跳槽中。刚刚参加完微软西雅图的面试,来分享一下自己的面试过程。一共7轮面试,其中1轮电面,6轮Onsite。第一轮 电面1第一轮是电面,先是让自我介绍,然后根据简历提了几个问题之后,就直接开始上题了。给出一个字符串(假设长度最长为1000),求出它的最长回文子串,你可以假定只有一个满足条件的最长回文子串。LintCode原题:http://

2017-05-23 22:56:16 1386

原创 饿了么面试回顾

面试流程:三轮技术面+一轮HR面。周二下午被通知去第一轮技术面,周二晚上就通知过了并且约了周三早上的第二轮技术面。中间隔了一天,周五上午进行的第三轮面试,三面结束后让等了十分钟,直接和HR约见。之后具体讨论入职事项,次周周三拿到正式Offer。面试内容:一轮技术面(面试官是一个感觉没比我大多少的小伙,大约就是一个比较基层的技术人员):简历上写第一位的项目的具体实现思路H

2017-05-10 02:20:45 2391

空空如也

空空如也

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

TA关注的人

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