Skip to content

Commit

Permalink
chore: 파일구조변경
Browse files Browse the repository at this point in the history
  • Loading branch information
oksunwoo committed Jan 14, 2022
1 parent 681cbd3 commit 403c38c
Show file tree
Hide file tree
Showing 64 changed files with 401 additions and 2,851 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.DS_Store
main.swift
Leetcode.xcodeproje
Binary file modified Toni/.DS_Store
Binary file not shown.
Binary file modified Toni/LeetCode/.DS_Store
Binary file not shown.
Empty file removed Toni/LeetCode/.gitkeep
Empty file.
358 changes: 358 additions & 0 deletions Toni/LeetCode/LeetCode.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>[Toni] Reverse Linked List.xcscheme_^#shared#^_</key>
<key>LeetCode.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Foundation

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

class Solution {
class Solution1 {
func buildArray(_ nums: [Int]) -> [Int] {
let arr = nums.map { num in
nums[num]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
import Foundation

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import Foundation

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

var answer = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
각 문장을 split하여 count를 하여 값을 구한 후 이전값과 비교하여 값을 구함
*/

class Solution {
class Solution4 {
func mostWordsFound(_ sentences: [String]) -> Int {
var answer = 0
for sentence in sentences {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation


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

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

class Solution {
class Solution7 {
func getDecimalValue(_ head: ListNode?) -> Int {
var bin = ""
var node = head
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

import Foundation

public class ListNode {
public var val: Int
public var next: ListNode?
public init(_ val: Int) {
self.val = val
self.next = nil
}
}
//public class ListNode {
// public var val: Int
// public var next: ListNode?
// public init(_ val: Int) {
// self.val = val
// self.next = nil
// }
//}


class Solution {
class Solution8 {
func deleteNode(_ node: ListNode?) {
node?.val = node!.next!.val
node?.next = node?.next?.next
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// [Toni] Merge Two Sorted Lists.swift
// LeetCode
//
// Created by Sunwoo on 2022/01/15.
//

import Foundation
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
*/
import Foundation

public class ListNode {
public var val: Int
public var next: ListNode?
public init() { self.val = 0; self.next = nil; }
public init(_ val: Int) { self.val = val; self.next = nil; }
public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
}
//public class ListNode {
// public var val: Int
// public var next: ListNode?
// public init() { self.val = 0; self.next = nil; }
// public init(_ val: Int) { self.val = val; self.next = nil; }
// public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
//}

class Solution {
class Solution9 {
func middleNode(_ head: ListNode?) -> ListNode? {
var node = head
var nodeCount = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
import Foundation


public class ListNode {
public var val: Int
public var next: ListNode?
public init() { self.val = 0; self.next = nil; }
public init(_ val: Int) { self.val = val; self.next = nil; }
public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
}
//public class ListNode {
// public var val: Int
// public var next: ListNode?
// public init() { self.val = 0; self.next = nil; }
// public init(_ val: Int) { self.val = val; self.next = nil; }
// public init(_ val: Int, _ next: ListNode?) { self.val = val; self.next = next; }
//}

class Solution {
class Solution10 {
func reverseList(_ head: ListNode?) -> ListNode? {
var node = head
var reverseArr:[Int] = []
Expand Down
Loading

0 comments on commit 403c38c

Please sign in to comment.