码迷,mamicode.com
首页 > 其他好文
leetcode[169]Majority Element
Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the arr...
分类:其他好文   时间:2015-02-09 00:45:03    阅读次数:179
leetcode[151]Reverse Words in a String
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Cl...
分类:其他好文   时间:2015-02-09 00:43:53    阅读次数:211
synchronized和volatile关键字
synchronized同步块大家都比较熟悉,通过 synchronized 关键字来实现,所有加上synchronized 和 块语句,在多线程访问的时候,同一时刻只能有一个线程能够用 synchronized 修饰方法或者代码块。volatile用volatile修饰的变量,线程在每次使用变量的...
分类:其他好文   时间:2015-02-09 00:44:58    阅读次数:177
leetcode[173]Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:其他好文   时间:2015-02-09 00:45:05    阅读次数:159
Let the Balloon Rise
问题陈述: 杭州电子科技大学HANGZHOU DIANZI UNIVERSITY Online Judge Problem - 1004问题解析: 输出每组数据中出现次数最多的颜色。代码详解: 1 #include 2 #include 3 #include 4 5 using na...
分类:其他好文   时间:2015-02-09 00:43:54    阅读次数:267
Hdu 1381 Crazy Search
Problem地址:http://acm.hdu.edu.cn/showproblem.php?pid=1381此题可以用哈希数组求解,至于什么是哈希,可以先看以下这篇推荐文章,写得挺不错的。推荐:http://www.cnblogs.com/yangecnu/p/Introduce-Hashtab...
分类:其他好文   时间:2015-02-09 00:44:07    阅读次数:247
2015第6周日
晚上睡前写今天随笔,本来可以很早很高质量写完的,结果晚上回来洗脚想着找点事干就看起了电视,然后一下子就用掉了1个多小时,有些惭愧不过转念一想也算自己交了时间学费,吸取经验教训:之所以会这样因为那个当下没有很急切重要的事干,那个当下大脑无所事事又不想闲着而又找不到该做的事自然就选择不用太费力又能消磨时...
分类:其他好文   时间:2015-02-09 00:44:54    阅读次数:237
leetcode[152]Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2015-02-09 00:42:25    阅读次数:216
Objective-C基础10 :代码块
代码块是对函数的一种扩展,但是比c语言中的函数指针高级多了。1.声明和定义。returnType (^blockName)(list of arg) = ^returnType(list of arg){body;};其中右边的returnType可以省略,因为编译器可以通过代码块的声明来推断函数的...
分类:其他好文   时间:2015-02-09 00:41:50    阅读次数:230
leetcode[160]Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a...
分类:其他好文   时间:2015-02-09 00:43:09    阅读次数:216
leetcode[155]Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:其他好文   时间:2015-02-09 00:43:38    阅读次数:237
[leed code 179] Larges Number
1 题目Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed...
分类:其他好文   时间:2015-02-09 00:43:28    阅读次数:173
Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:其他好文   时间:2015-02-09 00:42:31    阅读次数:150
个人知识管理系统Version1.0开发记录(14)
英 语 短 文 数 据 库 设 计使用PowerDesigner画了张简图,如下:图中存在错误和缺陷,仅供参考。各表作用,描述如下:1、英语短文表。记录英语短文信息。2、数据字典表。记录英语短文中专业分类信息。3、英语短文分类表。记录英语短文中专业分类、顺序、优先等信息。根据关联度进行三级分类。4、...
分类:其他好文   时间:2015-02-09 00:41:37    阅读次数:147
EF 用CallContext上下文管理
public class ObjectContextFactory { private static CIK_NewsEntities context; public static DbContext GetContext() { ...
分类:其他好文   时间:2015-02-09 00:39:49    阅读次数:254
cc(self)是什么意思?
分别找到这2句代码:复制代码cc(self):addComponent("components.behavior.EventProtocol"):exportMethods()cc.GameObject.extend(self):addComponent("components.behavior.E...
分类:其他好文   时间:2015-02-09 00:39:20    阅读次数:278
1028. List Sorting
1028. List Sorting (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueExcel can sort records according to any column. Now you are supposed ...
分类:其他好文   时间:2015-02-09 00:41:28    阅读次数:192
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!