Created
August 15, 2018 05:59
-
-
Save akarsh/0bca4b8f07492332518695c7f5af5c8e to your computer and use it in GitHub Desktop.
Swift data structures and algorithms usage
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
Where would data structures and algorithms are applied. Here are the quick examples: | |
- Diffing for UITableView / UICollection batchUpdate, using Longest Common Subsequence, or Edit Distance. | |
- Cache the value using Dictionary to perform search in O(1). (Which is the Hash-table and Dynamic Programming feature in CS) | |
- Traverse Tree will be used when you would like to traverse whole view hierarchy. | |
- You would need Trie data-structure to have a cached experience for @mention in Chat app / Dictionary. | |
- And how do you find the path between 2 points in Map app, Transport app without using Graph? ( Or you could use WebView and leave the hard thing for other engineers ) | |
- How do you structure a rich text Document without understand Tree data structure? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment