# Digit Counts 解题报告

Digit CountsDescriptionCount the number of k’s between 0 and n. k can be 0 - 9.Exampleif n = 12, k = 1 in[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]we have FIVE 1’s (1, 10, 11, 12)实现思路本题最简单的实现，就是遍历一个1~n...

# 操作系统IO硬件原理

IO系统I/O 设备及其接口线路、控制部件、通道和管理软件。IO设备类型 根据输入输出特性划分： 输入型外围设备、输出型外围设备和存储型外围设备 按照输入输出信息交换的单位划分： 字符设备：输入型外围设备和输出型外围设备一般为字符设备，它与内存进行信息交换的单位是字节，即一次交换 1 个或多个字节 块设备：块设备一次与内存交换的一个或几个块的信息，存储型外围设备一般为块设备 IO控制方式按照 I...

# Kth Largest Element 解题报告

Kth Largest ElementDescriptionFind K-th largest element in an array.NoticeYou can swap elements in the arrayExampleIn array [9,3,2,4,8], the 3rd largest element is 4.In array [1,2,3,4,5], the 1st large...

# Reorder array to construct the minimum number 解题报告

Reorder array to construct the minimum numberDescriptionConstruct minimum number by reordering a given non-negative integer array. Arrange them such that they form the minimum number.NoticeThe result m...

# getIntersectionNode 解题报告

getIntersectionNodeDescriptionWrite a program to find the node at which the intersection of two singly linked lists begins.NoticeIf the two linked lists have no intersection at all, return null. The li...

# Maximum Subarray 解题报告

Maximum SubarrayDescriptionGiven an array of integers, find a contiguous subarray which has the largest sum.NoticeThe subarray should contain at least one number.ExampleGiven the array [−2,2,−3,4,−1,2,...

# Majority Number 解题报告

Majority NumberDescriptionGiven an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it.It should support push, pop and min operation all in...

# Min Stack 解题报告

Min StackDescriptionImplement a stack with min() function, which will return the smallest number in the stack.It should support push, pop and min operation all in O(1) cost.Noticemin operation will nev...

# Copy List with Random Pointer 解题报告

Copy List with Random PointerDescriptionA linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list...

# Binary Tree Level Order Traversal 解题报告

Binary Tree Level Order TraversalDescriptionGiven a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).ExampleGiven binary tree {3,9,20,#,#,15,...

# Binary Tree Path Sum 解题报告

Binary Tree Path SumDescriptionGiven a binary tree, find all paths that sum of the nodes in the path equals to a given number target.A valid path is from root node to any of the leaf nodes.ExampleGiven...

# Fast Power 解题报告

Fast PowerDescriptionCalculate the an % b where a, b and n are all 32bit integers.ExampleFor 231 % 3 = 2 For 1001000 % 1000 = 0ChallengeO(logn)实现思路最直接的思路是直接进行n次循环，每次执行: a = (a*a) % b运算，时间复杂度为o(n)。 除...

# Print Numbers by Recursion 解题报告

Print Numbers by RecursionDescriptionPrint numbers from 1 to the largest number with N digits by recursion.Notice It’s pretty easy to do recursion like: recursion(i) { if i > largest number:...

# Remove Nth Node From End of List 解题报告

Remove Nth Node From End of ListDescriptionGiven a linked list, remove the nth node from the end of list and return its head.NoticeThe minimum number of nodes in list is n.ExampleGiven linked list: 1->...

141条 共10页1 2 3 4 5 ... 下一页 尾页
个人资料
• 访问：333924次
• 积分：4653
• 等级：
• 排名：第7455名
• 原创：132篇
• 转载：9篇
• 译文：0篇
• 评论：64条
博客专栏
 LintCode/LeetCode 题解 文章：29篇 阅读：7809
 操作系统核心原理学习笔记 文章：9篇 阅读：8815
 MySQL入门详解 文章：5篇 阅读：1779
 hibernate示例解析 文章：16篇 阅读：96343
 深入浅出Quartz任务调度 文章：7篇 阅读：22667
 Spring研磨分析 文章：45篇 阅读：150326
最新评论