├── Day04
├── README.md
└── Stack_ReversePolishnotation
│ ├── Stack_ReversePolishnotation
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Stack_ReversePolishnotation.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day05
├── README.md
└── Stack_ EvaluateReversePolishnotation
│ ├── Stack_ EvaluateReversePolishnotation
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Stack_ EvaluateReversePolishnotation.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day06
├── README.md
└── Stack_SimplifyPath
│ ├── Stack_SimplifyPath
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Stack_SimplifyPath.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day07
├── README.md
└── Stack_MinStack
│ ├── Stack_MinStack
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSMinStack.h
│ ├── DSStack.h
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Stack_MinStack.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day08
├── README.md
└── Stack_TrappingRainWater
│ ├── Stack_TrappingRainWater
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Stack_TrappingRainWater.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day10
├── README.md
├── DataStructure_Queue.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── DataStructure_Queue
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSQueue.h
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
│ └── Assets.xcassets
│ └── AppIcon.appiconset
│ └── Contents.json
├── Day11
├── README.md
└── DataStructure_Deque-master
│ ├── README.md
│ ├── DataStructure_Deque.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── DataStructure_Deque
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSDeque.h
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
│ └── Assets.xcassets
│ └── AppIcon.appiconset
│ └── Contents.json
├── Day12
└── README.md
├── Day13
└── README.md
├── Day14
└── README.md
├── Day15
├── README.md
└── DSBinaryTree
│ ├── DSBinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── NSObject+DSComparisonForIOS.m
│ ├── NSObject+DSComparisonForIOS.h
│ ├── DSQueue.h
│ ├── ViewController.m
│ ├── DSTreeNode.h
│ ├── DSBinaryTree.h
│ ├── DSTreeNode.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── DSBinaryTree.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day16
├── README.md
└── Tree_BTPaths
│ ├── Tree_BTPaths
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── NSObject+DSComparisonForIOS.m
│ ├── NSObject+DSComparisonForIOS.h
│ ├── DSQueue.h
│ ├── DSTreeNode.h
│ ├── DSBinaryTree.h
│ ├── DSTreeNode.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Tree_BTPaths.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Day17
├── README.md
└── MinimumDepth_BinaryTree
│ ├── MinimumDepth_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── MinimumDepth_BinaryTree.xcodeproj
│ ├── xcuserdata
│ └── penghe.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ └── penghe.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Day18
├── README.md
└── SumRootToLeaf_BinaryTree
│ ├── SumRootToLeaf_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── SumRootToLeaf_BinaryTree.xcodeproj
│ ├── xcuserdata
│ └── penghe.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ └── penghe.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Day19
├── README.md
└── Path_sum_III_BinaryTree
│ ├── Path_sum_III_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Path_sum_III_BinaryTree.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day20
├── README.md
└── SameTree_BinaryTree
│ ├── SameTree_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── SceneDelegate.h
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── main.m
│ ├── ViewController.m
│ ├── AppDelegate.m
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── SameTree_BinaryTree.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day21
├── README.md
└── SymmetricTree_BinaryTree
│ ├── SymmetricTree_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── SceneDelegate.h
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── main.m
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── ViewController.m
│ └── SymmetricTree_BinaryTree.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── penghe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day23
└── README.md
├── Day03
├── README.md
└── Stack_ValidParentheses
│ ├── Stack_ValidParentheses
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── ViewController.m
│ └── Stack_ValidParentheses.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day01
└── README.md
├── Day09
└── README.md
├── Day22
└── MaximumDepth_BinaryTree
│ ├── MaximumDepth_BinaryTree
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── SceneDelegate.h
│ ├── Tree
│ │ ├── NSObject+DSComparisonForIOS.m
│ │ ├── NSObject+DSComparisonForIOS.h
│ │ ├── DSQueue.h
│ │ ├── DSTreeNode.h
│ │ ├── DSBinaryTree.h
│ │ └── DSTreeNode.m
│ ├── main.m
│ ├── ViewController.m
│ ├── AppDelegate.m
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── MaximumDepth_BinaryTree.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ └── penghe.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Day02
├── DataStructure_Stack.xcodeproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── DataStructure_Stack
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DSStack.h
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
│ └── Assets.xcassets
│ └── AppIcon.appiconset
│ └── Contents.json
└── LICENSE
/Day04/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Day05/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Day06/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Day07/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Day08/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Day10/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day11/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day12/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day13/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day14/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day15/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day16/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day17/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day18/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day19/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day20/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day21/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day23/README.md:
--------------------------------------------------------------------------------
1 | ## 天下算法无不递归
2 |
3 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Day03/README.md:
--------------------------------------------------------------------------------
1 | # 100天iOS数据结构与算法实战 Day03 - 栈的算法实战Valid Parentheses
2 |
--------------------------------------------------------------------------------
/Day01/README.md:
--------------------------------------------------------------------------------
1 | ## Day01 - 算法的符号大O
2 | * 为什么要学习算法呢
3 | * 数学公式复习
4 | * 常用复杂度函数公式O(?)
--------------------------------------------------------------------------------
/Day09/README.md:
--------------------------------------------------------------------------------
1 | ## Day09 - iOS中数组的算法分析
2 | 前言
3 | iOS中数组是怎么优化的呢?
4 | 结合数组API来分析
5 | 推荐阅读
6 | GitHubDemo地址
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day15/DSBinaryTree/DSBinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Tree_BTPaths
4 | //
5 | // Created by penghe on 2019/5/7.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_MinStack
4 | //
5 | // Created by penghe on 2019/3/26.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day20/SameTree_BinaryTree/SameTree_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_SimplifyPath
4 | //
5 | // Created by penghe on 2019/3/25.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_ValidParentheses
4 | //
5 | // Created by penghe on 2019/3/20.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DataStructure_Deque
4 | //
5 | // Created by penghe on 2018/5/30.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MinimumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2019/6/9.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Path_sum_III_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/15.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_TrappingRainWater
4 | //
5 | // Created by penghe on 2019/3/31.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SumRootToLeaf_BinaryTree
4 | //
5 | // Created by penghe on 2019/7/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SymmetricTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/10/5.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_ReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/22.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SymmetricTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/10/5.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Tree_BTPaths
4 | //
5 | // Created by penghe on 2019/5/7.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Stack_ EvaluateReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/24.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_MinStack
4 | //
5 | // Created by penghe on 2019/3/26.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renmoqiqi/100-Days-Of-iOS-DataStructure-Algorithm/HEAD/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation.xcodeproj/project.xcworkspace/xcuserdata/penghe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_SimplifyPath
4 | //
5 | // Created by penghe on 2019/3/25.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SceneDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow * window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_ValidParentheses
4 | //
5 | // Created by penghe on 2019/3/20.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DataStructure_Deque
4 | //
5 | // Created by penghe on 2018/5/30.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MinimumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2019/6/9.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Path_sum_III_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/15.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SceneDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow * window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_TrappingRainWater
4 | //
5 | // Created by penghe on 2019/3/31.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SumRootToLeaf_BinaryTree
4 | //
5 | // Created by penghe on 2019/7/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // SymmetricTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/10/5.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SceneDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow * window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Tree_BTPaths
4 | //
5 | // Created by penghe on 2019/5/7.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_ReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/22.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_MinStack
4 | //
5 | // Created by penghe on 2019/3/26.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_SimplifyPath
4 | //
5 | // Created by penghe on 2019/3/25.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_ValidParentheses
4 | //
5 | // Created by penghe on 2019/3/20.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Stack_ EvaluateReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/24.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DataStructure_Deque
4 | //
5 | // Created by penghe on 2018/5/30.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MinimumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2019/6/9.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Path_sum_III_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/15.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_TrappingRainWater
4 | //
5 | // Created by penghe on 2019/3/31.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SumRootToLeaf_BinaryTree
4 | //
5 | // Created by penghe on 2019/7/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/NSObject+DSComparisonForIOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "NSObject+DSComparisonForIOS.h"
10 |
11 | @implementation NSObject (DSComparisonForIOS)
12 |
13 | - (BOOL)isEqualTo:(id)other
14 | {
15 | return [self isEqual:other];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_ReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/22.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/DSMinStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSMinStack.h
3 | // Stack_MinStack
4 | //
5 | // Created by penghe on 2019/3/26.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface DSMinStack : NSObject
13 |
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 |
16 | - (void)popLastObject;
17 | - (void)push:(id)object;
18 | - (id)peek;
19 | - (id)getMin;
20 |
21 | @end
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/NSObject+DSComparisonForIOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+DSComparisonForIOS.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSObject (DSComparisonForIOS)
14 |
15 | - (BOOL)isEqualTo:(id)obj;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DataStructure_Queue.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_MinStack.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DSBinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Stack_ EvaluateReversePolishnotation
4 | //
5 | // Created by penghe on 2019/3/24.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_SimplifyPath.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_ValidParentheses.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_TrappingRainWater.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SameTree_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_ReversePolishnotation.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MinimumDepth_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Path_sum_III_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MaximumDepth_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SumRootToLeaf_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SymmetricTree_BinaryTree.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Stack_ EvaluateReversePolishnotation.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/DSDeque.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSDeque.h
3 | // DataStructure_Deque
4 | //
5 | // Created by penghe on 2018/5/30.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSDeque : NSObject
12 |
13 | - (instancetype)init;
14 | - (BOOL)isEmpty;
15 | - (NSInteger)countOfQueue;
16 | - (void)enqueue:(id)object;
17 | - (void)enqueueFront:(id)object;
18 | - (id)dequeue;
19 | - (id)dequeueBack;
20 | - (id)peekFront;
21 | - (id)peekBack;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | - (void)compressedStack;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/DSQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSQueue.h
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSQueue : NSObject
12 |
13 | //初始化队列的方法最好提前定义好size 的大小后面避免频繁的动态扩容影响性能
14 | - (instancetype)initWithSize:(NSUInteger)size;
15 | //进队列
16 | - (void)enqueue:(id)object;
17 | //出队列
18 | - (id)dequeue;
19 | //是否为空
20 | - (BOOL)isEmpty;
21 | //队列的大小
22 | - (NSInteger)countOfQueue;
23 |
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/DSStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSStack.h
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSStack : NSObject
12 |
13 | - (instancetype)initWithSize:(NSUInteger)size;
14 |
15 | - (id)popLastObject;
16 | - (void)push:(id)object;
17 | - (id)peek;
18 | - (NSInteger)sizeOfStack;
19 | - (BOOL)isEmpty;
20 | - (BOOL)isFull;
21 | - (void)clear;
22 | - (NSArray *)allObjectsFromStack;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | NSString * appDelegateClassName;
14 | @autoreleasepool {
15 | // Setup code that might create autoreleased objects goes here.
16 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
17 | }
18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
19 | }
20 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SymmetricTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/10/5.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | NSString * appDelegateClassName;
14 | @autoreleasepool {
15 | // Setup code that might create autoreleased objects goes here.
16 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
17 | }
18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
19 | }
20 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | NSString * appDelegateClassName;
14 | @autoreleasepool {
15 | // Setup code that might create autoreleased objects goes here.
16 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
17 | }
18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
19 | }
20 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque.xcodeproj/xcuserdata/penghe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DataStructure_Deque.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 | DataStructure_Deque.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DataStructure_Deque
4 | //
5 | // Created by penghe on 2018/5/30.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSBinaryTree.h"
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 |
20 | DSBinaryTree *tree = [[DSBinaryTree alloc] initWithObject:@1];
21 | [tree insertNode:@2 parent:@1 isLeftChild:YES];
22 | [tree insertNode:@3 parent:@1 isLeftChild:NO];
23 | [tree insertNode:@5 parent:@2 isLeftChild:NO];
24 |
25 | }
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 |
22 | - (void)printDescription;
23 | //是否是左还是结点
24 | - (BOOL)isLeftChildOfParent;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 | - (instancetype)initNode:(NSObject *)node;
22 |
23 | - (void)printDescription;
24 | //是否是左还是结点
25 | - (BOOL)isLeftChildOfParent;
26 |
27 |
28 | @end
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/DSTreeNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 |
13 | @interface DSTreeNode : NSObject
14 |
15 | @property (nonatomic, strong) NSObject *object;
16 | @property (nonatomic, strong) DSTreeNode *leftChild;
17 | @property (nonatomic, strong) DSTreeNode *rightChild;
18 | @property (nonatomic, strong) DSTreeNode *parent;
19 | @property (nonatomic, assign) SEL compareSelector;
20 |
21 | - (instancetype)initNode:(NSObject *)node;
22 |
23 | - (void)printDescription;
24 | //是否是左还是结点
25 | - (BOOL)isLeftChildOfParent;
26 |
27 |
28 | @end
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/DSBinaryTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSBinaryTree.h
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DSTreeNode.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface DSBinaryTree : NSObject
15 | @property (nonatomic, strong) DSTreeNode *root;
16 |
17 | - (instancetype)initWithObject:(NSObject *)object;
18 | - (BOOL)insertNode:(NSObject *)node parent:(NSObject *)parent isLeftChild:(BOOL)value;
19 | - (DSTreeNode *)find:(NSObject *)object;
20 |
21 | - (void)preOrderTraversal;
22 | - (void)inOrderTraversal;
23 | - (void)postOrderTraversal;
24 | - (void)levelOrderTraversal;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (void)printDescription
14 | {
15 | NSLog(@"%@", self.object);
16 |
17 | if (self.leftChild) {
18 | NSLog(@"Left child of %@ will be the -->", self.object);
19 | [self.leftChild printDescription];
20 | }
21 |
22 | if (self.rightChild) {
23 | NSLog(@"Right child of %@ will be the -->", self.object);
24 | [self.rightChild printDescription];
25 | }
26 | }
27 |
28 | - (BOOL)isLeftChildOfParent
29 | {
30 | return self.parent.leftChild == self ? YES : NO;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // Stack_MinStack
4 | //
5 | // Created by penghe on 2019/3/26.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSMinStack.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | DSMinStack *minStack = [[DSMinStack alloc] initWithSize:10];
22 | [minStack push:@-2];
23 | [minStack push:@0];
24 | [minStack push:@-3];
25 | NSLog(@"%@",[minStack getMin]);
26 | [minStack popLastObject];
27 | [minStack popLastObject];
28 | NSLog(@"%@",[minStack getMin]);
29 |
30 | }
31 |
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DataStructure_Stack
4 | //
5 | // Created by penghe on 2018/5/7.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "DSStack.h"
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | // Do any additional setup after loading the view, typically from a nib.
22 | DSStack *testStack = [[DSStack alloc] initWithSize:10];
23 | [testStack push:@"1"];
24 | [testStack push:@"2"];
25 | [testStack push:@"5"];
26 | NSLog(@"%@",testStack);
27 | [testStack popLastObject];
28 | [testStack compressedStack];
29 |
30 | }
31 |
32 |
33 | - (void)didReceiveMemoryWarning {
34 | [super didReceiveMemoryWarning];
35 | // Dispose of any resources that can be recreated.
36 | }
37 |
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DataStructure_Queue
4 | //
5 | // Created by penghe on 2018/5/11.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSQueue.h"
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | DSQueue *queue = [[DSQueue alloc] initWithSize:5];
21 | [queue enqueue:@"1"];
22 | [queue enqueue:@"2"];
23 | [queue enqueue:@"3"];
24 | [queue enqueue:@"4"];
25 | [queue enqueue:@"5"];
26 |
27 | NSLog(@"%@--%ld",queue,queue.countOfQueue);
28 | [queue dequeue];
29 | [queue dequeue];
30 |
31 | NSLog(@"%@--%ld",queue,queue.countOfQueue);
32 |
33 |
34 |
35 | }
36 |
37 |
38 | - (void)didReceiveMemoryWarning {
39 | [super didReceiveMemoryWarning];
40 | // Dispose of any resources that can be recreated.
41 | }
42 |
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (instancetype)initNode:(NSObject *)node
14 | {
15 | self = [super init];
16 |
17 | if (self)
18 | {
19 | self.object = node;
20 | self.leftChild = nil;
21 | self.rightChild = nil;
22 |
23 | }
24 | return self;
25 | }
26 |
27 | - (void)printDescription
28 | {
29 | NSLog(@"%@", self.object);
30 |
31 | if (self.leftChild) {
32 | NSLog(@"Left child of %@ will be the -->", self.object);
33 | [self.leftChild printDescription];
34 | }
35 |
36 | if (self.rightChild) {
37 | NSLog(@"Right child of %@ will be the -->", self.object);
38 | [self.rightChild printDescription];
39 | }
40 | }
41 |
42 | - (BOOL)isLeftChildOfParent
43 | {
44 | return self.parent.leftChild == self ? YES : NO;
45 | }
46 | @end
47 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Tree/DSTreeNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSTreeNode.m
3 | // DSBinaryTree
4 | //
5 | // Created by penghe on 2018/11/22.
6 | // Copyright © 2018年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "DSTreeNode.h"
10 |
11 | @implementation DSTreeNode
12 |
13 | - (instancetype)initNode:(NSObject *)node
14 | {
15 | self = [super init];
16 |
17 | if (self)
18 | {
19 | self.object = node;
20 | self.leftChild = nil;
21 | self.rightChild = nil;
22 |
23 | }
24 | return self;
25 | }
26 |
27 | - (void)printDescription
28 | {
29 | NSLog(@"%@", self.object);
30 |
31 | if (self.leftChild) {
32 | NSLog(@"Left child of %@ will be the -->", self.object);
33 | [self.leftChild printDescription];
34 | }
35 |
36 | if (self.rightChild) {
37 | NSLog(@"Right child of %@ will be the -->", self.object);
38 | [self.rightChild printDescription];
39 | }
40 | }
41 |
42 | - (BOOL)isLeftChildOfParent
43 | {
44 | return self.parent.leftChild == self ? YES : NO;
45 | }
46 | @end
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 renmoqiqi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSBinaryTree.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | DSBinaryTree *tree = [[DSBinaryTree alloc] initWithObject:@1];
22 | [tree insertNode:@2 parent:@1 isLeftChild:YES];
23 | [tree insertNode:@3 parent:@1 isLeftChild:NO];
24 | [tree insertNode:@4 parent:@2 isLeftChild:YES];
25 | [tree insertNode:@5 parent:@2 isLeftChild:NO];
26 |
27 | NSLog(@"%ld",(long)[self maxDepthOfTree:tree.root]);
28 | }
29 |
30 |
31 | - (NSInteger)maxDepthOfTree:(DSTreeNode *)root
32 | {
33 | if (root == nil)
34 | {
35 | return 0;
36 | }
37 | else
38 | {
39 | NSInteger left_height = [self maxDepthOfTree:root.leftChild];
40 | NSInteger right_height = [self maxDepthOfTree:root.rightChild];
41 | return MAX(left_height, right_height)+1;
42 |
43 | }
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // MinimumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2019/6/9.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSBinaryTree.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | DSBinaryTree *tree = [[DSBinaryTree alloc] initWithObject:@1];
22 | [tree insertNode:@2 parent:@1 isLeftChild:YES];
23 | [tree insertNode:@3 parent:@1 isLeftChild:NO];
24 | [tree insertNode:@4 parent:@2 isLeftChild:YES];
25 | [tree insertNode:@5 parent:@2 isLeftChild:NO];
26 |
27 |
28 | NSLog(@"%d",[self minimumDepth:tree.root]);
29 |
30 | }
31 |
32 |
33 | - (int)minimumDepth:(DSTreeNode *)root
34 | {
35 | if (root == nil) {
36 | return 0;
37 | }
38 | if (root.leftChild == nil) {
39 | return [self minimumDepth:root.rightChild]+1;
40 |
41 | }
42 | if (root.rightChild == nil) {
43 | return [self minimumDepth:root.leftChild]+1;
44 |
45 | }
46 | return MIN([self minimumDepth:root.leftChild], [self minimumDepth:root.rightChild])+1;
47 |
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSBinaryTree.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 |
22 | DSBinaryTree *tree1 = [[DSBinaryTree alloc] initWithObject:@1];
23 | [tree1 insertNode:@2 parent:@1 isLeftChild:YES];
24 |
25 | DSBinaryTree *tree2 = [[DSBinaryTree alloc] initWithObject:@1];
26 | [tree2 insertNode:@2 parent:@1 isLeftChild:NO];
27 |
28 | if ([self sameTree:tree1.root q:tree2.root])
29 | {
30 | NSLog(@"YES");
31 | }
32 | else
33 | {
34 | NSLog(@"NO");
35 |
36 | }
37 | }
38 |
39 | - (BOOL)sameTree:(DSTreeNode *)p q:(DSTreeNode *)q
40 | {
41 | if (p == nil && q == nil)
42 | {
43 | return YES;
44 | }
45 | if (p == nil || q == nil)
46 | {
47 | return NO;
48 | }
49 |
50 | NSNumber *pNodeNumber = (NSNumber *)p.object;
51 | NSNumber *qNodeNumber = (NSNumber *)q.object;
52 |
53 | if (![pNodeNumber isEqualToNumber:qNodeNumber])
54 | {
55 | return NO;
56 |
57 | }
58 | return [self sameTree:p.rightChild q:q.rightChild] && [self sameTree:p.leftChild q:q.leftChild];
59 | }
60 |
61 |
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // SameTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/9/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | #pragma mark - UISceneSession lifecycle
25 |
26 |
27 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
28 | // Called when a new scene session is being created.
29 | // Use this method to select a configuration to create the new scene with.
30 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
31 | }
32 |
33 |
34 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions {
35 | // Called when the user discards a scene session.
36 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
37 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
38 | }
39 |
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // SymmetricTree_BinaryTree
4 | //
5 | // Created by penghe on 2019/10/5.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | #pragma mark - UISceneSession lifecycle
25 |
26 |
27 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
28 | // Called when a new scene session is being created.
29 | // Use this method to select a configuration to create the new scene with.
30 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
31 | }
32 |
33 |
34 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions {
35 | // Called when the user discards a scene session.
36 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
37 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
38 | }
39 |
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // MaximumDepth_BinaryTree
4 | //
5 | // Created by penghe on 2020/3/12.
6 | // Copyright © 2020 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | #pragma mark - UISceneSession lifecycle
25 |
26 |
27 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
28 | // Called when a new scene session is being created.
29 | // Use this method to select a configuration to create the new scene with.
30 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
31 | }
32 |
33 |
34 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions {
35 | // Called when the user discards a scene session.
36 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
37 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
38 | }
39 |
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SumRootToLeaf_BinaryTree
4 | //
5 | // Created by penghe on 2019/7/28.
6 | // Copyright © 2019 renmoqiqi. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSBinaryTree.h"
11 |
12 | @interface ViewController ()
13 |
14 | @property (assign, nonatomic) NSInteger sumTotal;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | // Do any additional setup after loading the view.
23 | DSBinaryTree *tree = [[DSBinaryTree alloc] initWithObject:@1];
24 | [tree insertNode:@2 parent:@1 isLeftChild:YES];
25 | [tree insertNode:@3 parent:@1 isLeftChild:NO];
26 | [tree insertNode:@4 parent:@2 isLeftChild:YES];
27 | [tree insertNode:@5 parent:@2 isLeftChild:NO];
28 |
29 |
30 | NSLog(@"%ld",(long)[self sumNumbers:tree.root]);
31 |
32 | }
33 |
34 | - (NSInteger)sumNumbers:(DSTreeNode *)rootNode
35 | {
36 | self.sumTotal = 0;
37 | [self helper:rootNode sum:0];
38 | return self.sumTotal;
39 |
40 | }
41 |
42 | - (void)helper:(DSTreeNode *)rootNode sum:(NSInteger)sum
43 | {
44 | if (rootNode == nil)
45 | {
46 | return;
47 | }
48 | NSNumber *rootNodeNumber = (NSNumber *)rootNode.object;
49 | sum = sum * 10 + [rootNodeNumber intValue];
50 |
51 | if (rootNode.leftChild == nil && rootNode.rightChild == nil) {
52 | self.sumTotal += sum;
53 | return;
54 | }
55 | [self helper:rootNode.leftChild sum:sum];
56 | [self helper:rootNode.rightChild sum:sum];
57 |
58 | }
59 |
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Day15/DSBinaryTree/DSBinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day16/Tree_BTPaths/Tree_BTPaths/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day07/Stack_MinStack/Stack_MinStack/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day06/Stack_SimplifyPath/Stack_SimplifyPath/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day02/DataStructure_Stack/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day10/DataStructure_Queue/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day08/Stack_TrappingRainWater/Stack_TrappingRainWater/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day17/MinimumDepth_BinaryTree/MinimumDepth_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day19/Path_sum_III_BinaryTree/Path_sum_III_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day20/SameTree_BinaryTree/SameTree_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day18/SumRootToLeaf_BinaryTree/SumRootToLeaf_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day04/Stack_ReversePolishnotation/Stack_ReversePolishnotation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day21/SymmetricTree_BinaryTree/SymmetricTree_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day22/MaximumDepth_BinaryTree/MaximumDepth_BinaryTree/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day05/Stack_ EvaluateReversePolishnotation/Stack_ EvaluateReversePolishnotation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day11/DataStructure_Deque-master/DataStructure_Deque/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Day03/Stack_ValidParentheses/Stack_ValidParentheses/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // Stack_ValidParentheses
4 | //
5 | // Created by penghe on 2019/3/20.
6 | // Copyright © 2019年 WondersGroup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "DSStack.h"
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 |
22 | if ([self isValid:@"({})[]"] == YES) {
23 | NSLog(@"valid");
24 | }
25 | else
26 | {
27 | NSLog(@"invalid");
28 | }
29 |
30 | }
31 |
32 | - (BOOL)isValid:(NSString *)inputStr
33 | {
34 | if (inputStr.length == 0 || inputStr.length%2 == 1)
35 | {
36 | return NO;
37 | }
38 |
39 | DSStack *newStack = [[DSStack alloc] initWithSize:10];
40 |
41 | for (int i =0 ; i