自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 iOS积累 001:不使用storyboard进行开发的简单初始化

自学的时候一直都是看着书用storyboard进行开发,觉得还挺方便。但真正实习的时候,组里都是用纯代码开发的,因此开始彻底抛弃storyboard。今天就来简单介绍下如何在不用storyboard的情况下进行最基本的开发。1、创建工程,删除main.storyboard。同时将设置页面的“General->Development Info->Main Interface”栏中内容

2015-05-23 13:46:31 2582

原创 iOS开发学习001_01:Address Book 01 显示通讯录中某人姓名、电话

Address Book主要是用于获取用户通讯录信息。有关的framework主要是Address Book UI和Address Book。以下将先通过几个例子对其进行介绍,再进行查漏补缺。先来做个快速了解,创建一个简单app,选取用户通讯录中某个人,并显示其姓名及电话。1、创建工程,导入Address Book UI、Address Book framewo

2015-05-21 11:51:41 588

原创 [C++]LeetCode 28: Implement strStr() (实现strStr()函数)

Problem:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.分析:int strStr(char* haystack, char* needle) 的作用是寻找needle

2015-05-19 21:16:43 490

原创 [C++]LeetCode 12: Integer to Roman(将整数转换为罗马数字)

Problem:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析:题目的要点在于罗马数字规则,见百度百科中罗马数字词条。剩下的就是写出与规则对应的逻辑。AC Code(C++):cla

2015-05-19 21:08:25 1270

原创 [C++]LeetCode 11: Container With Most Water(最大容积/最大矩形面积)

Problem:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i,

2015-05-19 20:57:52 715

原创 [C++]LeetCode 5: Longest Palindromic Substring(最长回文子串)

Problem:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.分析:最长回

2015-05-19 16:46:54 628

原创 [C++]LeetCode 27: Remove Element(删除数组中指定元素)

Problem:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new leng

2015-05-03 09:59:43 3436

原创 [C++]LeetCode 26: Remove Duplicates from Sorted Array(有序数组去重)

Problem:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in pl

2015-05-02 21:43:54 941

原创 [C++]LeetCode 21: Merge Two Sorted Lists(合并链表)

Problem:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.分析:归并排序的最后一个步骤。链表的归并的一个好处是当一个链表已经NULL时,只需

2015-05-02 21:15:53 466

原创 [C++]LeetCode 20: Valid Parentheses(判断运算符有效性)

Problem:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are

2015-05-02 20:53:27 452

原创 [C++]LeetCode 19: Remove Nth Node From End of List(删除链表中倒数第n个节点)

Problem:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the

2015-05-02 20:23:33 439

原创 [C++]LeetCode 14: Longest Common Prefix(最长公共前缀)

Problem:Write a function to find the longest common prefix string amongst an array of strings.分析:题目非常简单明了:求一组字符串的最长前缀。指明是前缀,只需将各个字符串中字符一一比较即可。有两种比较方式:1、两两比较,再将前缀结果与下一个比较。2、依次比较第i位上所有字符

2015-05-02 19:19:45 1284

原创 [C++]LeetCode 9: Palindrome Number(判断整数是否是回文数)

Problem:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to st

2015-05-02 15:42:47 2396

原创 [C++]LeetCode 8:String to Integer (atoi)(字符串转int)

Problem:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible

2015-05-02 14:36:37 461

原创 [C++]LeetCode 7:Reverse Integer(翻转整数)

Problem:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus poin

2015-05-02 14:23:48 2866

空空如也

空空如也

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

TA关注的人

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