[28] Implement strStr()

题目:28. Implement strStr() Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 题意: 该题目就是实现strstr()函数,该函数C语言原型如下:返回字符串str

[257] Binary Tree Paths

题目:257. Binary Tree Paths Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / 2 3 5 All root-to-leaf paths are: [“1->2->5”, “1->3”] 题意: 难度不大,考察树的遍历 解法: C++版本实现方法: 1 2 3 4 5 6 7

[018] Length Of Last Word

题目: Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defined as a character sequence consists of non-space characters only. For example, Given s = “Hello World”, return 5. 题意: 难度不大,考虑所有

iOS 远端推送部署详解

最近几天被iOS的推送部署给搞懵了,现在特地整理下和大家进行分享。 iOS远端推送机制 APNS,全称为Apple Push Notification service,是苹果通知

关于单链表的那些事儿

关于有环单链表,即单链表中存在环路,该问题衍生出很多面试题,特在此汇总,方便查阅也帮助自己梳理下思路。 如下图1所示为有环单链表,假设头结点为