Skip to content

Commit 403c38c

Browse files
committed
chore: 파일구조변경
1 parent 681cbd3 commit 403c38c

File tree

64 files changed

+401
-2851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+401
-2851
lines changed

Diff for: .DS_Store

0 Bytes
Binary file not shown.

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.DS_Store
2+
main.swift
3+
Leetcode.xcodeproje

Diff for: Toni/.DS_Store

0 Bytes
Binary file not shown.

Diff for: Toni/LeetCode/.DS_Store

-2 KB
Binary file not shown.

Diff for: Toni/LeetCode/.gitkeep

Whitespace-only changes.

Diff for: Toni/LeetCode/LeetCode.xcodeproj/project.pbxproj

+358
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<dict>
55
<key>SchemeUserState</key>
66
<dict>
7-
<key>[Toni] Reverse Linked List.xcscheme_^#shared#^_</key>
7+
<key>LeetCode.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
1010
<integer>0</integer>

Diff for: Toni/LeetCode/[Toni] Build Array from Permutation/[Toni] Build Array from Permutation/main.swift renamed to Toni/LeetCode/LeetCode/Array/[Toni] Build Array from Permutation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Foundation
1212

1313
let nums = [0,2,1,5,3,4]
1414

15-
class Solution {
15+
class Solution1 {
1616
func buildArray(_ nums: [Int]) -> [Int] {
1717
let arr = nums.map { num in
1818
nums[num]

Diff for: Toni/LeetCode/[Toni] Concatenation of Array/[Toni] Concatenation of Array/main.swift renamed to Toni/LeetCode/LeetCode/Array/[Toni] Concatenation of Array.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
import Foundation
1111

12-
class Solution {
12+
class Solution2 {
1313
func getConcatenation(_ nums: [Int]) -> [Int] {
1414
let answer = nums + nums
1515

Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import Foundation
1515

16-
class Solution {
16+
class Solution3 {
1717
func finalValueAfterOperations(_ operations: [String]) -> Int {
1818

1919
var answer = 0
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
각 문장을 split하여 count를 하여 값을 구한 후 이전값과 비교하여 값을 구함
99
*/
1010

11-
class Solution {
11+
class Solution4 {
1212
func mostWordsFound(_ sentences: [String]) -> Int {
1313
var answer = 0
1414
for sentence in sentences {

Diff for: Toni/LeetCode/[Toni] Running Sum of 1d Array/[Toni] Running Sum of 1d Array/main.swift renamed to Toni/LeetCode/LeetCode/Array/[Toni] Running Sum of 1d Array.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Foundation
1414

1515

1616
//1. 속도는 느리고, 메모리는 아낄수 있음
17-
class Solution {
17+
class Solution5 {
1818
func runningSum(_ nums: [Int]) -> [Int] {
1919
var sum = 0
2020
var answer: [Int] = []
@@ -28,7 +28,7 @@ class Solution {
2828
}
2929

3030
//2. 속도가 매우빠르지만, 메모리는 조금더 씀
31-
class Solution {
31+
class Solution6 {
3232
func runningSum(_ nums: [Int]) -> [Int] {
3333
var sum = nums[0]
3434
var answer = nums
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ListNode {
2222
public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
2323
}
2424

25-
class Solution {
25+
class Solution7 {
2626
func getDecimalValue(_ head: ListNode?) -> Int {
2727
var bin = ""
2828
var node = head

Diff for: Toni/LeetCode/[Toni] Delete Node in a Linked List/[Toni] Delete Node in a Linked List/main.swift renamed to Toni/LeetCode/LeetCode/LinkedList/[Toni] Delete Node in a Linked List.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111

1212
import Foundation
1313

14-
public class ListNode {
15-
public var val: Int
16-
public var next: ListNode?
17-
public init(_ val: Int) {
18-
self.val = val
19-
self.next = nil
20-
}
21-
}
14+
//public class ListNode {
15+
// public var val: Int
16+
// public var next: ListNode?
17+
// public init(_ val: Int) {
18+
// self.val = val
19+
// self.next = nil
20+
// }
21+
//}
2222

2323

24-
class Solution {
24+
class Solution8 {
2525
func deleteNode(_ node: ListNode?) {
2626
node?.val = node!.next!.val
2727
node?.next = node?.next?.next
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// [Toni] Merge Two Sorted Lists.swift
3+
// LeetCode
4+
//
5+
// Created by Sunwoo on 2022/01/15.
6+
//
7+
8+
import Foundation

Diff for: Toni/LeetCode/[Toni] Middle of the Linked List/[Toni] Middle of the Linked List/main.swift renamed to Toni/LeetCode/LeetCode/LinkedList/[Toni] Middle of the Linked List.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
*/
1010
import Foundation
1111

12-
public class ListNode {
13-
public var val: Int
14-
public var next: ListNode?
15-
public init() { self.val = 0; self.next = nil; }
16-
public init(_ val: Int) { self.val = val; self.next = nil; }
17-
public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
18-
}
12+
//public class ListNode {
13+
// public var val: Int
14+
// public var next: ListNode?
15+
// public init() { self.val = 0; self.next = nil; }
16+
// public init(_ val: Int) { self.val = val; self.next = nil; }
17+
// public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
18+
//}
1919

20-
class Solution {
20+
class Solution9 {
2121
func middleNode(_ head: ListNode?) -> ListNode? {
2222
var node = head
2323
var nodeCount = 0

Diff for: Toni/LeetCode/[Toni] Reverse Linked List/[Toni] Reverse Linked List/main.swift renamed to Toni/LeetCode/LeetCode/LinkedList/[Toni] Reverse Linked List.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
import Foundation
1111

1212

13-
public class ListNode {
14-
public var val: Int
15-
public var next: ListNode?
16-
public init() { self.val = 0; self.next = nil; }
17-
public init(_ val: Int) { self.val = val; self.next = nil; }
18-
public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
19-
}
13+
//public class ListNode {
14+
// public var val: Int
15+
// public var next: ListNode?
16+
// public init() { self.val = 0; self.next = nil; }
17+
// public init(_ val: Int) { self.val = val; self.next = nil; }
18+
// public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
19+
//}
2020

21-
class Solution {
21+
class Solution10 {
2222
func reverseList(_ head: ListNode?) -> ListNode? {
2323
var node = head
2424
var reverseArr:[Int] = []

0 commit comments

Comments
 (0)