This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array2 = [4,2,2,5,7,2,1,9,3] | |
func merge(left:[Int],right:[Int]) -> [Int] { | |
var mergedList = [Int]() | |
var l = left | |
var r = right | |
while l.count > 0 && r.count > 0 { | |
if l.first! < r.first! { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array1 = [3,4,1,6,7,2,5,5] | |
for i in 1..<array1.count { | |
let a = array1[i] | |
var b = i-1 | |
while b >= 0 && array1[b] > a { | |
array1[b+1] = array1[b] | |
b -= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// KeyBoardExtension.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import Foundation | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MainViewModifier.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import Foundation | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TaskSearchView.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import SwiftUI | |
struct TaskSearchView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AddTaskView.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import SwiftUI | |
struct AddTaskView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SortPickerView.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import SwiftUI | |
struct SortPickerView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TaskListView.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import SwiftUI | |
struct TaskListView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TaskViewModel.swift | |
// TaskManager | |
// | |
// Created by Mohammad Yasir on 11/04/21. | |
// | |
import Foundation | |
class TaskViewModel : Identifiable , ObservableObject { |