本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Palindrome Number
Total Accepted: 12165 Total
Submissions: 41736
Determine whether an integer is a palindrome. Do this wit...
分类:
其他好文 时间:
2014-05-13 05:28:07
阅读次数:
253
原题地址:http://oj.leetcode.com/problems/minimum-depth-of-binary-tree/题意:Given
a binary tree, find its minimum depth.The minimum depth is the number of no...
分类:
编程语言 时间:
2014-05-12 21:55:15
阅读次数:
348
原文地址:http://blog.hsdn.net/1266.html我的公司使用AD進行使用者驗證,因此在使用者操作的便利性考量前提下.如何讓使用者不需要重覆輸入帳號與密碼,而直接抓取使用者已經登入AD的帳號資訊,已經變成系統開發必須要考量的項目之一
(至少我自己是這樣認為啦 @@).NET整合A...
分类:
其他好文 时间:
2014-05-12 21:38:46
阅读次数:
463
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4279
HDU集训队选拔赛地点:3教3楼机房,时间:5月10日(周六)12:00开始,请相互转告,谢谢~
百度之星编程大赛——您报名了吗?
...
分类:
其他好文 时间:
2014-05-12 15:05:02
阅读次数:
316
原文第1章 单例模式(Single
Pattern)单例模式就是保证在整个应用程序的生命周期中,在任何时刻,被指定的类只有一个实例,并为客户程序提供一个获取该实例的全局访问点。一、常用模式:123456789101112131415161718publicclassSingleton
{ priva...
分类:
其他好文 时间:
2014-05-12 08:37:16
阅读次数:
219
原文:[转载]js
isArray小结在日常开发中,我们经常需要判断某个对象是否是数组类型的,在js中检测对象类型的常见的方法有几种:
1、typeof操作符。对于Function、String、Number、Undefined这几种类型的对象来说,不会有什么问题,但是针对Array的对象就没什么用...
分类:
Web程序 时间:
2014-05-12 07:42:50
阅读次数:
468
HDU 1394 Minimum Inversion Number (数据结构-线段树)
题目大意:
求逆序数。也就是给你一个序列,每次求逆序数,然再把第一个数放到这个序列的末尾,构成新的序列。问你这n个序列的最小的逆序数。
解题思路:
1、对于每个序列,其原来的逆序数记为 pre , 如果当前把该序列 第一个数 a[0] 移动到尾部,那么新序列的逆序数为 pre-a[i]+(n-a[i]-1)
因为序列中比a[i]大的数有 n-a[i]-1 个,比a[i]小的有 a[i]个。
因此只需求出...
分类:
其他好文 时间:
2014-05-12 07:07:01
阅读次数:
301
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-11 18:15:52
阅读次数:
300
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Single Number II
Total Accepted: 14224 Total
Submissions: 43648
Given an array of integers, every element appears three ti...
分类:
其他好文 时间:
2014-05-11 03:54:46
阅读次数:
317
题意:在一组数组中除一个元素外其它元素都出现两次,找出这个元素
思路:位运算。异或。因为异或操作可以交换元素的顺序,所以元素异或的顺序没影响,
最后出现再次的元素都会被异或掉,相当于0和只出现一次的那个元素异或,结果还是那个元素
推广:这个方法也适合于出现其它元素都出现偶数次,而要找的元素出现奇数次的情况
相关题目:Single Number II
class Solution...
分类:
其他好文 时间:
2014-05-11 02:37:42
阅读次数:
397