Skip to content

Commit d7f83dd

Browse files
committed
docs: Pascal's Triangle
1 parent 0bde001 commit d7f83dd

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

Help.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
5E5FE82426959E5100C5A396 /* Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5FE82326959E5100C5A396 /* Equatable.swift */; };
2222
5E5FE8262695A27B00C5A396 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5FE8252695A27B00C5A396 /* Comparable.swift */; };
2323
5E66D43626694663001CB8F0 /* FailableInitializers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E66D43526694663001CB8F0 /* FailableInitializers.swift */; };
24+
5E709213278CA0BA0060FB31 /* PascalTriangleAnimated2.gif in Resources */ = {isa = PBXBuildFile; fileRef = 5E709212278CA0BA0060FB31 /* PascalTriangleAnimated2.gif */; };
2425
5E72DD5E266A76EE00A8E543 /* Guard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E72DD5D266A76EE00A8E543 /* Guard.swift */; };
2526
5E8385532667635000ACA770 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E8385522667635000ACA770 /* AppDelegate.swift */; };
2627
5E8385552667635000ACA770 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E8385542667635000ACA770 /* SceneDelegate.swift */; };
@@ -71,6 +72,7 @@
7172
5E5FE82326959E5100C5A396 /* Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Equatable.swift; sourceTree = "<group>"; };
7273
5E5FE8252695A27B00C5A396 /* Comparable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comparable.swift; sourceTree = "<group>"; };
7374
5E66D43526694663001CB8F0 /* FailableInitializers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FailableInitializers.swift; sourceTree = "<group>"; };
75+
5E709212278CA0BA0060FB31 /* PascalTriangleAnimated2.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = PascalTriangleAnimated2.gif; sourceTree = "<group>"; };
7476
5E72DD5D266A76EE00A8E543 /* Guard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Guard.swift; sourceTree = "<group>"; };
7577
5E83854F2667635000ACA770 /* Help.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Help.app; sourceTree = BUILT_PRODUCTS_DIR; };
7678
5E8385522667635000ACA770 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -158,6 +160,7 @@
158160
5E2CF7C4266E242E007BB2EB /* segue-001.png */,
159161
5E2CF7C3266E242E007BB2EB /* segue-002.png */,
160162
5E84F23A26FC424B00BA06D3 /* home-screen-quick-actions.jpeg */,
163+
5E709212278CA0BA0060FB31 /* PascalTriangleAnimated2.gif */,
161164
);
162165
path = Screenshots;
163166
sourceTree = "<group>";
@@ -357,6 +360,7 @@
357360
5E83855F2667635400ACA770 /* LaunchScreen.storyboard in Resources */,
358361
5E8385712667681600ACA770 /* README.md in Resources */,
359362
5E83855C2667635400ACA770 /* Assets.xcassets in Resources */,
363+
5E709213278CA0BA0060FB31 /* PascalTriangleAnimated2.gif in Resources */,
360364
5ED4FE63270920F700E3B850 /* License in Resources */,
361365
5E83855A2667635000ACA770 /* Main.storyboard in Resources */,
362366
5E2CF7C6266E242E007BB2EB /* segue-001.png in Resources */,

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,18 +1454,18 @@ class SomeViewController: UIViewController {
14541454
14551455
### [Pascal's Triangle](https://github.com/lgreydev/Help/blob/master/Help/LeetCode/Pascal'sTriangle.swift)
14561456
1457-
Given an integer numRows, return the first numRows of Pascal's triangle.
1458-
In Pascal's triangle, each number is the sum of the two numbers directly above it as shown:
1457+
Given an integer numRows, return the first numRows of Pascal's triangle.<br>
1458+
In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: <br>
14591459
1460-
**Example 1:**
1461-
Input: numRows = 5
1462-
Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]
1460+
<img src="https://github.com/lgreydev/Help/blob/master/Screenshots/PascalTriangleAnimated2.gif" width="350">
14631461

1464-
**Example 2:**
1465-
Input: numRows = 1
1466-
Output: [[1]]
1467-
1468-
1462+
**Example 1:**<br>
1463+
*Input:* `numRows = 5`<br>
1464+
*Output:* `[[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]`<br>
1465+
1466+
**Example 2:**<br>
1467+
*Input:* `numRows = 1`<br>
1468+
*Output:* `[[1]]`
14691469

14701470
``` swift
14711471

28.2 KB
Loading

0 commit comments

Comments
 (0)