`
liuzhifu123
  • 浏览: 34703 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
Introduction I choose to write about references in C++ because I feel most of the people have misconceptions about references. I got this feeling because I took many C++ interviews and I seldom get correct answers about references in C++. What is meant by references in C++? A reference is genera ...

C++ 指针

Pointers We have already seen how variables are seen as memory cells that can be accessed using their identifiers. This way we did not have to care about the physical location of our data within memory, we simply used its identifier whenever we wanted to refer to our variable.The memory of your c ...

回调函数

在计算机程序设计中,回调函数,或简称回调,是指通过函数参数传递到其它代码的,某一块可执行代码的引用。这一®
Property Declaration Attributes You can decorate a property with attributes by using the form @property(attribute [, attribute2, ...]) . Like methods, properties are scoped to their enclosing interface declaration. For property declarations that use a comma-delimited list of variable names, t ...
Notice: This article is just a note.   Here are some more important facts about NSDictionary: • Whenever you add an object to a dictionary, the dictionary retains it. Whenever you remove an object from a dictionary, the dictionary releases it. • There can only be one object for each key. Therefor ...
注:本文是一份学习笔记。    UITableViewCell is a subclass of UIView, and each row in a UITableView is represented by a UITableViewCell. (Recall that a table on the iPhone can only have one column, so a row will only have one cell.)   A UITableView asks its data source for the cells it should display when i ...
注:本文是一份学习笔记。   Notifications: In every application, there is an instance of NSNotificationCenter, which works like a smart bulletin board. An object can register as an observer (“Send any ‘lost dog’ notifications to me.”). When another object posts a notification (“I lost my dog.”), the notificati ...
贪心算法 适用于最优化问题的算法往往包含一系列步骤,每一步都有一组选择。贪心算法是使所做的选择看起来是当前最佳的,期望通过所做的局部最优解来产生出一个全局最优解。贪心算法对大多数优化问题来说可以产生最优解,但并不一定总是这样的。贪心算法的两个经典例子是最小生成树算法和Dijkstra单源最短路径算法。 1贪心策略的基本内容 贪心算法是通过做一系列的选择来给出某一问题的最优解。对算法中的每一个决策点,做一个当时看起来最佳的选择。这种启发式的策略并不是总能产生最优解,但它常常能给出最优解。 一般地,根据以下步骤设计贪心算法: (1)        将优化问题转化为这样的一个问题:先做出选择 ...
注:本文是一份学习笔记。 cocoa touch由苹果公司提供的软件开发api, 用于开发 iphone\ipod\ipad上的软件。也是苹果公司针对iPhone应用程序快速开发提供的一个类库。此库以一系列框架库的形式存在,支持开发人员使用用户界面元素构建图像化的事件驱动的应用程序。Cocoa Touch 层由多个框架组成,他们为应用程序提供了核心功能。  UIKit 负责启动和结束应用程序,控制界面和多触点事件  Map Kit 提供地图的相关服务  Game Kit 创建和使用网络机制  Message UI/Adress Book UI 提供操作电子邮件和联系人的信息   A ca ...
QuickSort 一  Introduction      快速排序的最坏运行时间是Θ(n²);但在实践上它常常是最好的算法,因为它在平均情况下的期望运行时间是Θ(n lg n),而且隐藏在Θ(n lg n)里面的常量因子是很小的。同时,它是一种原地排序算法,在虚拟内存上也工作良好。    另外,通过随机函数可以极大降低最坏情况的出现概率。 二  算法描述      快速排序算法和归并排序一样,是一种基于分治思想(divide-and-conquer)的排序算法。以下是对数组A[p...r]中的元素进行快速排序的过程。    Divide: Partition (rearrange) ...

About This Blog

Hello,everyone,welcome to my blog. This blog will focus on data structure and algorithm. When introduce an algorithm, I will describe the theory as well as an implementation in one of  my familiar language. Algorithm, programing,design are the basic skills for an software engineer,so this blog will ...
Global site tag (gtag.js) - Google Analytics