自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

知之可否

Be yourself; everyone else is already taken.​

  • 博客(9)
  • 资源 (10)
  • 收藏
  • 关注

原创 lintcode:Update Bits

Given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e g , M becomes a substring of N located at i and starting at j)

2016-01-31 23:21:53 1106

原创 lintcode:Trailing Zeros

15:00 Start Write an algorithm which computes the number of trailing zeros in n factorial. Example 11! = 39916800, so the out should be 2 Challenge O(log N) time阶乘末尾一个零表示一个进位,则相当于乘以10 而

2016-01-30 23:09:57 1068

原创 lintcode: Unique Paths

A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach

2016-01-30 22:56:51 465

原创 lintcode: O(1) Check Power of 2

Using O(1) time to check whether an integer n is a power of 2. Example For n=4, return true; For n=5, return false; Challenge O(1) time思路:如果n是2的幂,则n的二进制表示中只有一个1. 用n&(n-1),如果结果是0则表示只有一个1.

2016-01-27 22:04:22 785

原创 lintcode: Flip Bits

Determine the number of bits required to flip if you want to convert integer n to integer m. Example Given n = 31 (11111), m = 14 (01110), return 2. Note Both n and m are 32-bit integers.

2016-01-26 23:03:17 901

原创 lintcode:Wood Cut

Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the same length. What is the longest length you ca

2016-01-26 16:21:28 1284

原创 lintcode:Search for a Range

Given a sorted array of n integers, find the starting and ending position of a given target value. If the target is not found in the array, return [-1, -1]. Example Given [5, 7, 7, 8, 8

2016-01-26 13:58:07 460

原创 二分查找上界和下界

详细见详细见《算法竞赛入门》P229这里用的是左闭右开空间[left , right)upper_bound返回的是target应该插入的位置或者最后一次出现位置的下一个位置这里的实现就跟STL中的这两个函数功能类似STL源码学习—-lower_bound和upper_bound算法#include<vector>#include<iostream>using namespace st

2016-01-26 13:49:04 2075

原创 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its index

2016-01-07 22:57:42 400

C++prime第四版答案

C++prime第四版答案 细节不能放过

2015-03-29

Win7平台VS2010安装Visual Assist X

vs2010适用的破解版vax 编程辅助工具,已验证在win7 和winxp系统均可使用(无论是64bit还是32bit)。注意用破解的DLL覆盖原dll,路径为: (1)如果是Windows7系统: C:/Users/用户名/AppData/Local/Microsoft/VisualStudio/10.0/Extensions/Whole Tomato Software/Visual Assist X/10.7.1901.0 (2)如果是XP系统: C:/Documents and Settings/用户名/Local Settings/Application Data/Microsoft/VisualStudio /10.0/Extensions/Whole Tomato Software/Visual Assist X/10.7.1901.0

2015-03-20

中科大2006-2014年计算机复试机试题

本人是14年考入中科大的计算机研究生。这里面有我做的2006-2014年的全部机试题的代码。 奉献给大家。

2014-09-12

合工大操作系统课程设计:基于内存的文件系统

首先分配一定容量的内存,建立虚拟磁盘; 在该磁盘上建立相应的文件系统; 为该文件系统设计相应的数据结构来管理目录、虚拟磁盘的空闲空间、已分配空间等。 提供文件的创建、删除、移位、改名等功能。 提供良好的界面,可以显示磁盘文件的状态和空间的使用情况; 提供虚拟磁盘转储功能,可将信息存入磁盘,还可从磁盘读入内存; 完全实现了上面的功能,验收的时候老师给了“优”

2013-07-07

北方民族大学试卷(软件工程)

北方民族大学试卷,2010的软件工程导论期末试卷,不容错过哦!

2013-06-10

飞鸽传书简化版代码

一个自己DIY的飞鸽传书JAVA程序,在Eclipse上可以完美的运行,没有任何错误。是课程设计或者毕业设计的最佳选择。4分物超所值。

2013-05-04

合工大单片机考试试卷

合工大单片机考试考试,内部资料,考试和考研最佳选择

2013-04-18

北大ACM答案

不多说,物廉价美,会对你的编程技术大有提高

2013-04-13

数据结构之迷宫游戏课程设计

适合用于课程设计,代码详尽,有图有真相,能够在VC上直接运行

2013-04-13

编译原理课程设计精华合集

有编译原理课程设计的大部分程序的报告,比如递归下降子程序,SLR(1)文法,算法优先表的构造,词法分析,还有算法优先分析的可视化程序.绝对物超所值!

2012-12-05

空空如也

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

TA关注的人

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