├── .github └── workflows │ ├── .stale.yml │ └── directory_workflow.yml ├── .gitignore ├── DIRECTORY.md ├── README.md ├── Search ├── BinarySearch.swift └── LinearSearch.swift ├── algorithms ├── AI │ └── minimax │ │ ├── README.md │ │ ├── Resources │ │ ├── demo.gif │ │ └── image1.jpg │ │ └── Sources │ │ ├── Minimax.playground │ │ ├── Contents.swift │ │ ├── Sources │ │ │ ├── Model │ │ │ │ ├── Board │ │ │ │ │ ├── Board.swift │ │ │ │ │ ├── BoardPosition.swift │ │ │ │ │ └── BoardStatus.swift │ │ │ │ ├── GameModel │ │ │ │ │ ├── DifficultLevel.swift │ │ │ │ │ └── GameModel.swift │ │ │ │ ├── Minimax │ │ │ │ │ ├── GameStateValue.swift │ │ │ │ │ └── Minimax.swift │ │ │ │ └── Player │ │ │ │ │ ├── Player.swift │ │ │ │ │ ├── PlayerSymbol.swift │ │ │ │ │ └── PlayerType.swift │ │ │ └── View │ │ │ │ └── BoardView.swift │ │ ├── contents.xcplayground │ │ └── playground.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ │ └── Tests │ │ ├── Tests.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── Tests │ │ ├── BoardTests.swift │ │ ├── Info.plist │ │ ├── MinimaxTests.swift │ │ └── PlayerTests.swift ├── conversion │ ├── binary-to-decimal.swift │ └── decimal-to-binary.swift ├── palindrome │ ├── palindrome_indices.swift │ ├── palindrome_recursion.swift │ └── palindrome_reversed.swift └── parsing │ └── shunting_yard │ └── shunting_yard.swift ├── data_structures ├── Linked List │ └── LinkedList.swift ├── Stack │ └── stack.swift ├── doubly_linked_list │ └── DoublyLinkedList.swift ├── heap │ └── heap.swift ├── queue │ └── queue.swift └── union_find │ └── union_find.swift ├── graph ├── BFS │ └── BFS.swift ├── DFS │ └── DFS.swift ├── Graph.swift └── spanning_tree │ ├── dijkstra.swift │ └── kruskal.swift ├── recursion └── fibonacci.swift ├── sorts ├── BubbleSort.swift ├── CocktailSort.swift ├── InsertionSort.swift ├── MergeSort.swift ├── PancakeSort.swift ├── QuickSort.swift └── SelectionSort.swift └── trees └── tree.swift /.github/workflows/.stale.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/.github/workflows/.stale.yml -------------------------------------------------------------------------------- /.github/workflows/directory_workflow.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/.github/workflows/directory_workflow.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /DIRECTORY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/DIRECTORY.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/README.md -------------------------------------------------------------------------------- /Search/BinarySearch.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/Search/BinarySearch.swift -------------------------------------------------------------------------------- /Search/LinearSearch.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/Search/LinearSearch.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/README.md -------------------------------------------------------------------------------- /algorithms/AI/minimax/Resources/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Resources/demo.gif -------------------------------------------------------------------------------- /algorithms/AI/minimax/Resources/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Resources/image1.jpg -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Contents.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Contents.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/Board.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/Board.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/BoardPosition.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/BoardPosition.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/BoardStatus.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Board/BoardStatus.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/GameModel/DifficultLevel.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/GameModel/DifficultLevel.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/GameModel/GameModel.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/GameModel/GameModel.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Minimax/GameStateValue.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Minimax/GameStateValue.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Minimax/Minimax.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Minimax/Minimax.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/Player.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/Player.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/PlayerSymbol.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/PlayerSymbol.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/PlayerType.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/Model/Player/PlayerType.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/Sources/View/BoardView.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/Sources/View/BoardView.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/contents.xcplayground: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/contents.xcplayground -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/playground.xcworkspace/contents.xcworkspacedata -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Minimax.playground/playground.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Minimax.playground/playground.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.pbxproj -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests/BoardTests.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests/BoardTests.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests/Info.plist -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests/MinimaxTests.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests/MinimaxTests.swift -------------------------------------------------------------------------------- /algorithms/AI/minimax/Sources/Tests/Tests/PlayerTests.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/AI/minimax/Sources/Tests/Tests/PlayerTests.swift -------------------------------------------------------------------------------- /algorithms/conversion/binary-to-decimal.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/conversion/binary-to-decimal.swift -------------------------------------------------------------------------------- /algorithms/conversion/decimal-to-binary.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/conversion/decimal-to-binary.swift -------------------------------------------------------------------------------- /algorithms/palindrome/palindrome_indices.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/palindrome/palindrome_indices.swift -------------------------------------------------------------------------------- /algorithms/palindrome/palindrome_recursion.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/palindrome/palindrome_recursion.swift -------------------------------------------------------------------------------- /algorithms/palindrome/palindrome_reversed.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/palindrome/palindrome_reversed.swift -------------------------------------------------------------------------------- /algorithms/parsing/shunting_yard/shunting_yard.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/algorithms/parsing/shunting_yard/shunting_yard.swift -------------------------------------------------------------------------------- /data_structures/Linked List/LinkedList.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/Linked List/LinkedList.swift -------------------------------------------------------------------------------- /data_structures/Stack/stack.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/Stack/stack.swift -------------------------------------------------------------------------------- /data_structures/doubly_linked_list/DoublyLinkedList.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/doubly_linked_list/DoublyLinkedList.swift -------------------------------------------------------------------------------- /data_structures/heap/heap.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/heap/heap.swift -------------------------------------------------------------------------------- /data_structures/queue/queue.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/queue/queue.swift -------------------------------------------------------------------------------- /data_structures/union_find/union_find.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/data_structures/union_find/union_find.swift -------------------------------------------------------------------------------- /graph/BFS/BFS.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/graph/BFS/BFS.swift -------------------------------------------------------------------------------- /graph/DFS/DFS.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/graph/DFS/DFS.swift -------------------------------------------------------------------------------- /graph/Graph.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/graph/Graph.swift -------------------------------------------------------------------------------- /graph/spanning_tree/dijkstra.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/graph/spanning_tree/dijkstra.swift -------------------------------------------------------------------------------- /graph/spanning_tree/kruskal.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/graph/spanning_tree/kruskal.swift -------------------------------------------------------------------------------- /recursion/fibonacci.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/recursion/fibonacci.swift -------------------------------------------------------------------------------- /sorts/BubbleSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/BubbleSort.swift -------------------------------------------------------------------------------- /sorts/CocktailSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/CocktailSort.swift -------------------------------------------------------------------------------- /sorts/InsertionSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/InsertionSort.swift -------------------------------------------------------------------------------- /sorts/MergeSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/MergeSort.swift -------------------------------------------------------------------------------- /sorts/PancakeSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/PancakeSort.swift -------------------------------------------------------------------------------- /sorts/QuickSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/QuickSort.swift -------------------------------------------------------------------------------- /sorts/SelectionSort.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/sorts/SelectionSort.swift -------------------------------------------------------------------------------- /trees/tree.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAlgorithms/Swift/HEAD/trees/tree.swift --------------------------------------------------------------------------------