码迷,mamicode.com
首页 > 其他好文
leetcode[74]Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2015-02-09 15:37:57    阅读次数:116
leetcode[81]Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2015-02-09 15:37:57    阅读次数:174
3Sum
题目描述:Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:E...
分类:其他好文   时间:2015-02-09 15:37:52    阅读次数:146
增删改查
using System;using System.Data;using System.Text;using System.Data.SqlClient;using Maticsoft.DBUtility;//Please add referencesnamespace Maticsoft.DAL{...
分类:其他好文   时间:2015-02-09 15:34:35    阅读次数:227
MPI编程简单介绍
第三章MPI编程3.1 MPI简单介绍多线程是一种便捷的模型,当中每一个线程都能够訪问其他线程的存储空间。因此,这样的模型仅仅能在共享存储系统之间移植。一般来讲,并行机不一定在各处理器之间共享存储,当面向非共享存储系统开发并行程序时,程序的各部分之间通过来回传递消息的方式通信。要使得消息传递方式可移...
分类:其他好文   时间:2015-02-09 15:36:04    阅读次数:125
自己动手写编译器、链接器作者自序
本书讲述了一个真实编译器的开发过程,源语言是以C语言为蓝本,进行适当简化定义的一门新语言,称之为SC语言(简化的C语言),目标语言是大家熟悉的Intel x86机器语言。在本书中,读者将看到从SC语言定义,到SCC编译器开发的完整过程。本书介绍的SCC编译器,没有借助Lex与Yacc这些编译器自动生...
分类:其他好文   时间:2015-02-09 15:33:12    阅读次数:217
【knowledgebase】不要在一个很大的RDD上调用collect
如果一个RDD很大以至于它的所有元素并不能在driver端机器的内存中存放下,请不要进行如下调用:val values = myVeryLargeRDD.collect()collect将尝试拷贝RDD中的每个元素到Driver端,容易导致OOM或者crash;相反,如果你能通过调用take、tak...
分类:其他好文   时间:2015-02-09 15:34:34    阅读次数:171
leetcode[60]Permutation Sequence
The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie...
分类:其他好文   时间:2015-02-09 15:34:37    阅读次数:189
leetcode[88]Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:其他好文   时间:2015-02-09 15:32:58    阅读次数:146
leetcode[87]Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2015-02-09 15:31:37    阅读次数:149
leetcode[64]Minimum Path Sum
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:其他好文   时间:2015-02-09 15:33:25    阅读次数:165
ZeroMQ接口函数之 :zmq_tcp – 使用TCP协议的ØMQ网络单播协议
ZeroMQ 官方地址 :http://api.zeromq.org/4-1:zmq-tcpzmq_tcp(7) ØMQ Manual - ØMQ/4.1.0Namezmq_tcp – 使用TCP协议的ØMQ网络单播协议SynopsisTCP是一个应用广泛、可靠、单播的传输协议。当在一个网络中使用Z...
分类:其他好文   时间:2015-02-09 15:33:48    阅读次数:597
leetcode[67]Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".class Solution {public:string addBinary(string ...
分类:其他好文   时间:2015-02-09 15:32:50    阅读次数:127
ZOJ 1315【Excuses, Excuses!】------2015年2月9日
一:题目大意输入数据m,n,其中m是代表关键字的个数(每个关键字是一个字符串(但无空格)),n表示接口的数目,每一个借口由可有空格的字符串组成。现在需要对所有的接口进行扫描,找出含有关键字最多的借口并输出(若有多个都输出且不需要注意顺序)。二:题目分析本题算法难度并不大,但关键是处理字符串的技巧。详...
分类:其他好文   时间:2015-02-09 15:31:42    阅读次数:100
03-3. Tree Traversals Again (PAT)
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the...
分类:其他好文   时间:2015-02-09 15:30:01    阅读次数:124
cocos2dx3.4 分割plist图片
如果想要修改一个plist文件新打包成plist,而此刻原来的小图都找不到了,那只能把plist分解了,代码如下:void UiManage::DecodePlist(string imgPath,string plistPath){ FileUtils *pFileUtil=FileUtil...
分类:其他好文   时间:2015-02-09 15:31:35    阅读次数:404
leetcode[86]Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2015-02-09 15:31:55    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!