Swift-X-Algorithms icon indicating copy to clipboard operation
Swift-X-Algorithms copied to clipboard

πŸ”¨ Algorithms & Data Structures implemented in Swift X. `let X = 5.0`

Swift-X-Algorithms

Algorithms & Data Structures implemented in Swift X (X = 4.2).

δΈ­ζ–‡η‰ˆ README

Preface

Hello!

Algorithms is the soul of programs. But I am a green hand in this field. Now I am trying to learn them well, to open my mind in thinking how to write elegant code.

If my code did help you, would you please give me a Star 🌟? It will courage me to move on! Thank you!

No doubt that I would made some mistakes in it, if you find some bugs, please issue me. I am looking forward to discuss with you about the magic of Swift! Thank you!

Contents

  • Sort

    • Selection Sort
    • Insertion Sort
    • Insertion Sort Advanced
    • Bubble Sort
    • Shell Sort
    • Merge Sort
    • Merge Sort Advanced
    • Merge Sort Bottom Up
    • Quick Sort
    • Quick Sort Randomized
    • Quick Sort 2 Way
    • Quick Sort 3 Way
    • Heap Sort
    • Heap Sort Heapify
  • Search

    • Binary Search Iteratively
    • Binary Search Recursively
  • Data Structure

    • Heap
  • LeetCode

    • 001 Two Sum
    • 007 Reverse Integer
    • 009 Palindrome Number
    • 014 Longest Common Prefix
    • 020 Valid Parentheses
    • 021 Merge Two Sorted Lists
    • 026 Remove Duplicates from Sorted Array
    • 027 Remove Element
    • 028 Implement strStr()
    • 035 Search Insert Position
    • 038 Count and Say
    • 053 Maximum Subarray
    • 058 Length of Last Word
    • 066 Plus One
    • 067 Add Binary
    • 069 Sqrt(x)
    • 070 Climbing Stairs
    • 083 Remove Duplicates from Sorted List
    • 088 Merge Sorted Array
    • 100 Same Tree
    • 101 Symmetric Tree
    • 104 Maximum Depth of Binary Tree
    • 107 Binary Tree Level Order Traversal II
    • 108 Convert Sorted Array to Binary Search Tree

Why Swift X?

Swift is a new-born programming language which update continuously. It has a lot of new features and grammar changes between different versions before its ABI is stable.

Currently, the newest version of Swift is 4.2 (with Xcode 10).

So I try to use X to represent the newest version of Swift and adapt to the newest Xcode.

Reference

Revision History

LICENSE

  • MIT