├── .gitignore ├── .pre-commit-config.yaml ├── Big Data ├── Big Data Ecosystem.html └── Big Data Ecosystem.ipynb ├── Books ├── Anomaly Detection Principles and Algorithms │ ├── Anomaly Detection Principles and Algorithms.html │ ├── Anomaly Detection Principles and Algorithms.ipynb │ └── images │ │ ├── AC.png │ │ ├── DBSCAN.png │ │ ├── DC.png │ │ ├── FKMC.png │ │ └── KMC.png ├── Crucial Conversations │ ├── Crucial Conversations.html │ └── Crucial Conversations.ipynb ├── Database System Concepts │ ├── Database System Concepts.html │ ├── Database System Concepts.ipynb │ └── images │ │ ├── Figure_10_2.png │ │ ├── Figure_10_3.png │ │ ├── Figure_11_34.png │ │ ├── Figure_11_9.png │ │ ├── Figure_12_1.png │ │ ├── Figure_12_10.png │ │ ├── Figure_12_3.png │ │ ├── Figure_12_5.png │ │ ├── Figure_12_6.png │ │ ├── Figure_12_7.png │ │ ├── Figure_12_ESM_1.png │ │ ├── Figure_12_ESM_2.png │ │ ├── Figure_12_INLJ_1.png │ │ ├── Figure_14_1.png │ │ ├── Figure_14_12.png │ │ ├── Figure_14_14.png │ │ ├── Figure_14_15.png │ │ ├── Figure_14_2.png │ │ ├── Figure_14_CS_1.png │ │ ├── Figure_15_1.png │ │ ├── Figure_15_10.png │ │ ├── Figure_15_15.png │ │ ├── Figure_15_16.png │ │ ├── Figure_15_4.png │ │ ├── Figure_15_WFG_1.png │ │ ├── Figure_16_5.png │ │ ├── Figure_1_5.png │ │ ├── Figure_20_1.png │ │ ├── Figure_20_2.png │ │ ├── Figure_20_3.png │ │ ├── Figure_20_4.png │ │ ├── Figure_7_1.png │ │ ├── Figure_7_10.png │ │ ├── Figure_7_11.png │ │ ├── Figure_7_12.png │ │ ├── Figure_7_14.png │ │ ├── Figure_7_2.png │ │ ├── Figure_7_21.png │ │ ├── Figure_7_3.png │ │ ├── Figure_7_5.png │ │ ├── Figure_7_6.png │ │ ├── Figure_7_8.png │ │ ├── Figure_7_9.png │ │ ├── Figure_7_RS_1.png │ │ ├── Figure_8_11.png │ │ ├── Figure_8_12.png │ │ ├── Figure_8_7.png │ │ ├── Figure_8_8.png │ │ ├── Figure_8_9.png │ │ └── Figure_A_2.png └── Probability and Statistics for Computer Science │ ├── Probability and Statistics for Computer Science.html │ ├── Probability and Statistics for Computer Science.ipynb │ └── images │ ├── Beta_PDF.gif │ ├── Cauchy_PDF.gif │ ├── Exponential_PDF.gif │ ├── Figure_1_4.png │ ├── Figure_1_5.png │ ├── Figure_1_7.png │ ├── Figure_1_8.png │ ├── Figure_2_15.png │ ├── Figure_6_1.png │ ├── Gamma_PDF.gif │ ├── Normal_PDF.gif │ ├── Uniform_PDF.gif │ └── Weibull_PDF.gif ├── Courses ├── ECE405 │ ├── ECE405 Notes.html │ ├── ECE405 Notes.ipynb │ └── images │ │ ├── F01_1.png │ │ ├── F01_15.png │ │ ├── F01_2.png │ │ ├── F01_3.png │ │ ├── F01_4.png │ │ ├── F01_5.png │ │ ├── F01_6.png │ │ ├── F02_3.png │ │ ├── F02_38.png │ │ └── F02_7.png ├── ECE453 │ ├── ECE453 Notes.html │ └── ECE453 Notes.ipynb ├── ECE454 │ ├── ECE454 Notes.html │ ├── ECE454 Notes.ipynb │ ├── ECE454 Notes.pdf │ └── images │ │ ├── 2PC_1.png │ │ ├── 2PC_2.png │ │ ├── Architecture_1.png │ │ ├── Architecture_2.png │ │ ├── Architecture_3.png │ │ ├── Architecture_4.png │ │ ├── Architecture_5.png │ │ ├── Clocks_1.png │ │ ├── Communication_1.png │ │ ├── Communication_2.png │ │ ├── Communication_3.png │ │ ├── Consistency_1.png │ │ ├── Consistency_2.png │ │ ├── Consistency_3.png │ │ ├── Consistency_4.png │ │ ├── DFS_1.png │ │ ├── DFS_2.png │ │ ├── DFS_3.png │ │ ├── DFS_4.png │ │ ├── DFS_5.png │ │ ├── DFS_6.png │ │ ├── DFS_7.png │ │ ├── Fault_Tolerance_1.png │ │ ├── Fault_Tolerance_2.png │ │ ├── Fault_Tolerance_3.png │ │ ├── Hadoop_1.png │ │ ├── Hadoop_2.png │ │ ├── Hadoop_3.png │ │ ├── Kafka_1.png │ │ ├── Processes_1.png │ │ ├── Processes_2.png │ │ ├── Processes_3.png │ │ ├── Raft_Algorithm_1.png │ │ ├── Raft_Algorithm_2.png │ │ ├── Raft_Algorithm_3.png │ │ ├── Replication_1.png │ │ ├── Replication_2.png │ │ ├── Replication_3.png │ │ ├── Spark_1.png │ │ ├── Spark_2.png │ │ └── Spark_3.png ├── ECE457A │ ├── ECE457A Notes.html │ ├── ECE457A Notes.ipynb │ ├── ECE457A Notes.pdf │ └── images │ │ ├── GA_1.png │ │ ├── GA_10.png │ │ ├── GA_11.png │ │ ├── GA_12.png │ │ ├── GA_13.png │ │ ├── GA_14.png │ │ ├── GA_2.png │ │ ├── GA_3.png │ │ ├── GA_4.png │ │ ├── GA_5.png │ │ ├── GA_6.png │ │ ├── GA_7.png │ │ ├── GA_8.png │ │ ├── GA_9.png │ │ ├── Metaheuristics_1.png │ │ ├── Minimax_Algorithm_1.png │ │ ├── PSO_1.png │ │ └── Simulated_Annealing_1.png ├── ECE459 │ ├── ECE459 Notes.html │ └── ECE459 Notes.ipynb └── ECE493 │ ├── ECE493 Notes.html │ ├── ECE493 Notes.ipynb │ ├── ECE493 Notes.pdf │ └── images │ ├── BL_1.png │ ├── BN_1.png │ ├── BN_P1.png │ ├── BN_P2.png │ ├── DP_RL_1.png │ ├── DP_RL_2.png │ ├── DP_RL_3.png │ ├── DP_RL_4.png │ ├── DP_RL_5.png │ ├── DP_RL_6.png │ ├── MC_RL_1.png │ ├── MC_RL_2.png │ ├── MC_RL_3.png │ ├── MC_RL_4.png │ ├── MC_RL_5.png │ ├── MDP_1.png │ ├── MDP_2.png │ ├── MDP_3.png │ ├── MDP_4.png │ ├── MDP_5.png │ ├── MRF_1.png │ ├── MRF_2.png │ ├── MRF_3.png │ ├── MS_RL_1.png │ ├── MS_RL_2.png │ ├── MS_RL_3.png │ ├── MS_RL_4.png │ ├── MS_RL_5.png │ ├── NN_1.jpg │ ├── NN_2.png │ ├── PG_1.png │ ├── PG_2.png │ ├── PG_3.png │ ├── PG_4.png │ ├── PG_5.png │ ├── PG_6.png │ ├── TD_RL_1.png │ ├── TD_RL_2.png │ ├── TD_RL_3.png │ ├── TS_1.png │ ├── VA_1.png │ ├── VA_2.png │ ├── VA_3.png │ ├── VE_1.png │ ├── VE_2.png │ └── VE_P1.png ├── Data Structures and Algorithms ├── 1. Java Standard Library.html ├── 1. Java Standard Library.ipynb ├── 10. Strings.html ├── 10. Strings.ipynb ├── 2. Data Structures.html ├── 2. Data Structures.ipynb ├── 3. Sorting and Searching.html ├── 3. Sorting and Searching.ipynb ├── 4. Combinations and Permutations.html ├── 4. Combinations and Permutations.ipynb ├── 5. Backtracking.html ├── 5. Backtracking.ipynb ├── 6. Dynamic Programming.html ├── 6. Dynamic Programming.ipynb ├── 7. Graphs.html ├── 7. Graphs.ipynb ├── 8. Trees.html ├── 8. Trees.ipynb ├── 9. Bit Hacks.html └── 9. Bit Hacks.ipynb ├── Databases ├── Architecture of a Database System │ ├── Architecture of a Database System.html │ ├── Architecture of a Database System.ipynb │ └── images │ │ └── AOADS_1.png └── PostgreSQL │ ├── PostgreSQL 12.html │ ├── PostgreSQL 12.ipynb │ └── pdfs │ ├── Explaining the Postgres Query Optimizer.pdf │ ├── Hacking PostgreSQL.pdf │ ├── Inside PostgreSQL Shared Memory.pdf │ ├── Intro to Postgres Planner Hacking.pdf │ ├── Introduction to Hacking PostgreSQL - Handout.pdf │ ├── Introduction to Hacking PostgreSQL.pdf │ ├── Introduction to Memory Contexts.pdf │ ├── MVCC Unmasked.pdf │ ├── Parallelism in PostgreSQL 11.pdf │ ├── PostgreSQL Internals Through Pictures.pdf │ ├── PostgreSQL Performance Tuning.pdf │ ├── Query Execution Techniques in PostgreSQL.pdf │ ├── Unlocking the Postgres Lock Manager.pdf │ └── Will Postgres Live Forever.pdf ├── LeetCode ├── Blind 75.html ├── Blind 75.ipynb ├── LeetCode Patterns.html ├── LeetCode Patterns.ipynb └── README.md ├── Papers ├── A Brief Review of Nature-Inspired Algorithms for Optimization.pdf ├── A Survey of Distributed File Systems.pdf ├── A Survey of Join Processing in Data Streams.pdf ├── A Survey on Learning to Hash.pdf ├── A shortest augmenting path algorithm for dense and sparse linear assignment problems.pdf ├── Adaptive Cuckoo Filters.pdf ├── Advanced Bloom Filter Based Algorithms for Efficient Approximate Data De-Duplication in Streams.pdf ├── An Experimental Study of Compression Methods for Dynamic Tries.pdf ├── Approximate Membership of Sets - A Survey.pdf ├── Approximate Range Emptiness in Constant Time and Optimal Space.pdf ├── Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters.pdf ├── Architecture of a Database System.pdf ├── Asymptotically Optimal Filters.pdf ├── Average-Case Analysis of Approximate Trie Search.pdf ├── Bizur - A Key-value Consensus Algorithm for Scalable File-systems.pdf ├── BloomUnit - Declarative Testing for Distributed Programs.pdf ├── C99 Standard.pdf ├── CRDTs.pdf ├── Cache-aware load balancing of data center applications.pdf ├── Cassandra.pdf ├── Chucky - A Succinct Cuckoo Filter for LSM-Tree.pdf ├── Compilation Methods of Minimal Acyclic Finite-State Automata for Large Dictionaries.pdf ├── Consistency Analysis in Bloom - a CALM and Collected Approach.pdf ├── Constant Time Recovery in Azure SQL Database.pdf ├── Coordination Avoidance in Database Systems.pdf ├── Discretized Streams - Fault-Tolerant Streaming Computation at Scale.pdf ├── Dostoevsky - Better Space-Time Trade-Offs for LSM-Tree Based Key-Value Stores via Adaptive Removal of Superfluous Merging.pdf ├── Dynamical sources in information theory - A general analysis of trie structures.pdf ├── Dynamo - Amazon’s Highly Available Key-value Store.pdf ├── Fully-Online Suffix Tree and Directed Acyclic Word Graph Construction for Multiple Texts.pdf ├── HDFS.pdf ├── Hand-book on statistical distributions for experimentalists.pdf ├── Hashing Techniques - A Survey and Taxonomy.pdf ├── Hashing for Similarity Search - A Survey.pdf ├── Highly Available Transactions - Virtues and Limitations.pdf ├── Hive - A Warehousing Solution Over a Map-Reduce Framework.pdf ├── How to Read a Paper.pdf ├── In Search of an Understandable Consensus Algorithm.pdf ├── Incremental Construction of Compact Acyclic NFAs.pdf ├── InfiniFilter - Expanding Filters to Infinity and Beyond.pdf ├── Interactive Checks for Coordination Avoidance.pdf ├── Kafka - a Distributed Messaging System for Log Processing.pdf ├── LSM-based Storage Techniques - A Survey.pdf ├── Linear Bidirectional On-Line Construction of Affix Trees.pdf ├── Logic and Lattices for Distributed Programming.pdf ├── MapReduce.pdf ├── MillWheel - Fault-Tolerant Stream Processing at Internet Scale.pdf ├── Monkey - Optimal Navigable Key-Value Store.pdf ├── Mostly Order Preserving Dictionaries.pdf ├── Multiple Set Matching with Bloom Matrix and Bloom Vector.pdf ├── Optimal insertion in deterministic DAWGs.pdf ├── Optimizing Bloom Filter - Challenges, Solutions, and Comparisons.pdf ├── Parallel Implementation of Tree Skeletons.pdf ├── PostgreSQL Internals.pdf ├── Practical Implementation of Rank and Select Queries.pdf ├── Pregel - A System for Large-Scale Graph Processing.pdf ├── Probabilistically Bounded Staleness for Practical Partial Quorums.pdf ├── Quantifying eventual consistency with PBS.pdf ├── Readings in Database Systems, 5th Edition - Reading List.pdf ├── Readings in Database Systems, 5th Edition.pdf ├── Resilient Distributed Datasets - A Fault-Tolerant Abstraction for In-Memory Cluster Computing.pdf ├── Rosetta - A Robust Space-Time Optimized Range Filter for Key-Value Stores.pdf ├── Scalable Atomic Visibility with RAMP Transactions.pdf ├── Space-Efficient, High-Performance Rank & Select Structures on Uncompressed Bit Sequences.pdf ├── Spanner - Google's Globally-Distributed Database.pdf ├── Spark SQL - Relational Data Processing in Spark.pdf ├── Spooky - Granulating LSM-Tree Compactions Correctly.pdf ├── SuRF.pdf ├── Succinct Data Structures for Families of Interval Graphs.pdf ├── Succinct Data Structures for Retrieval and Approximate Membership.pdf ├── Succinct Representation for (Non)Deterministic Finite Automata.pdf ├── Succinct Representation of Trees and Graphs.pdf ├── Survey and Taxonomy of Lossless Graph Compression and Space-Efficient Graph Representations.pdf ├── The Little Book of Semaphores.pdf ├── The Log-Structured Merge -Bush and the Wacky Continuum.pdf ├── Theory and Practice of Chunked Sequences.pdf ├── Theory and Practice of Monotone Minimal Perfect Hashing.pdf ├── Thrift - Scalable Cross-Language Services Implementation.pdf ├── Univariate Distribution Relationships.pdf ├── Xor Filters - Faster and Smaller Than Bloom and Cuckoo Filters.pdf ├── YCSB.pdf └── ZooKeeper.pdf ├── Programming Languages ├── C99.html ├── C99.ipynb ├── Java.html ├── Java.ipynb ├── Python 3.html ├── Python 3.ipynb ├── Scala.html └── Scala.ipynb ├── README.md ├── References.html └── References.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/osx,jupyternotebook 3 | 4 | ### JupyterNotebook ### 5 | .ipynb_checkpoints 6 | */.ipynb_checkpoints/* 7 | 8 | # Remove previous ipynb_checkpoints 9 | # git rm -r .ipynb_checkpoints/ 10 | # 11 | 12 | ### OSX ### 13 | # General 14 | .DS_Store 15 | .AppleDouble 16 | .LSOverride 17 | 18 | # Icon must end with two \r 19 | Icon 20 | 21 | # Thumbnails 22 | ._* 23 | 24 | # Files that might appear in the root of a volume 25 | .DocumentRevisions-V100 26 | .fseventsd 27 | .Spotlight-V100 28 | .TemporaryItems 29 | .Trashes 30 | .VolumeIcon.icns 31 | .com.apple.timemachine.donotpresent 32 | 33 | # Directories potentially created on remote AFP share 34 | .AppleDB 35 | .AppleDesktop 36 | Network Trash Folder 37 | Temporary Items 38 | .apdisk 39 | 40 | 41 | # End of https://www.gitignore.io/api/osx,jupyternotebook 42 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: local 3 | hooks: 4 | - id: jupyter-html 5 | name: HTML Render 6 | entry: jupyter nbconvert --to=html --template=full 7 | language: system 8 | files: .ipynb 9 | types: [file] 10 | - id: jupyter-html-fix 11 | name: HTML Render Fix 12 | entry: sed -i '' 's/^None//' 13 | language: system 14 | files: .html 15 | types: [file] 16 | -------------------------------------------------------------------------------- /Big Data/Big Data Ecosystem.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Big Data Ecosystem\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "## NoSQL/NewSQL Databases\n", 16 | "\n", 17 | "### CockroachDB\n", 18 | "\n", 19 | "An open-source, distributed NewSQL OLTP database based on Google's Spanner to provide CP guarantees and ACID transactions.\n", 20 | "\n", 21 | "#### Use Cases\n", 22 | "\n", 23 | "- PostgreSQL Replacement (Wire-Protocol Compatible).\n", 24 | "- Distributed SQL.\n", 25 | "- ACID Transactions.\n", 26 | "\n", 27 | "#### See Also\n", 28 | "\n", 29 | "- [Home Page](https://www.cockroachlabs.com/)\n", 30 | "- [GitHub](https://github.com/cockroachdb/cockroach)\n", 31 | "\n", 32 | "### Cassandra\n", 33 | "\n", 34 | "An open-source, distributed key-value/columnar store based on Amazon's Dynamo to provide AP guarantees.\n", 35 | "\n", 36 | "#### Use Cases\n", 37 | "\n", 38 | "- Globally Distributed Replication.\n", 39 | "- Automatic TTL.\n", 40 | "- Event Data.\n", 41 | "- Machine Learning Data.\n", 42 | "- Time-Series Data.\n", 43 | "\n", 44 | "#### See Also\n", 45 | "\n", 46 | "- [Home Page](http://cassandra.apache.org/)\n", 47 | "- [GitHub](https://github.com/apache/cassandra)\n", 48 | "\n", 49 | "### Druid\n", 50 | "\n", 51 | "An open-source, federated OLAP/analytics database.\n", 52 | "\n", 53 | "#### Use Cases\n", 54 | "\n", 55 | "- Historical and Real-Time Analytics.\n", 56 | "\n", 57 | "#### See Also\n", 58 | "\n", 59 | "- [Home Page](http://druid.io/)\n", 60 | "- [GitHub](https://github.com/apache/incubator-druid)\n", 61 | "\n", 62 | "### Elasticsearch\n", 63 | "\n", 64 | "An open-source, sharded full-text search engine to provide CP guarantees.\n", 65 | "\n", 66 | "#### Use Cases\n", 67 | "\n", 68 | "- Full-Text Search.\n", 69 | "- Geospatial Intelligence.\n", 70 | "- Log Ingestion, Analysis, and Visualization.\n", 71 | "\n", 72 | "#### See Also\n", 73 | "\n", 74 | "- [Home Page](https://www.elastic.co/)\n", 75 | "- [GitHub](https://github.com/elastic/elasticsearch)\n", 76 | "\n", 77 | "### Kafka\n", 78 | "\n", 79 | "An open-source, distributed publisher/subscriber message queue.\n", 80 | "\n", 81 | "#### Use Cases\n", 82 | "\n", 83 | "- Activity Tracking.\n", 84 | "- Real-Time Metrics.\n", 85 | "- Log Aggregation.\n", 86 | "- Stream Processing.\n", 87 | "- Event Sourcing.\n", 88 | "- Commit Log.\n", 89 | "\n", 90 | "#### See Also\n", 91 | "\n", 92 | "- [Home Page](http://kafka.apache.org/)\n", 93 | "- [GitHub](https://github.com/apache/kafka)\n", 94 | "\n", 95 | "### JanusGraph\n", 96 | "\n", 97 | "An open-source, distributed graph database which is a fork of TitanDB.\n", 98 | "\n", 99 | "#### Use Cases\n", 100 | "\n", 101 | "- Fraud Detection.\n", 102 | "- Infrastructure Monitoring.\n", 103 | "- Recommendation Engines.\n", 104 | "- Social Network Graphs.\n", 105 | "\n", 106 | "#### See Also\n", 107 | "\n", 108 | "- [Home Page](http://janusgraph.org/)\n", 109 | "- [GitHub](https://github.com/JanusGraph/janusgraph)\n", 110 | "\n", 111 | "### MongoDB\n", 112 | "\n", 113 | "An open-source, sharded BSON-document store to provide CP guarantees.\n", 114 | "\n", 115 | "#### Use Cases\n", 116 | "\n", 117 | "- Flexible Schemas.\n", 118 | "- Complex Hierarchical Data.\n", 119 | "\n", 120 | "#### See Also\n", 121 | "\n", 122 | "- [Home Page](https://www.mongodb.com/)\n", 123 | "- [GitHub](https://github.com/mongodb/mongo)\n", 124 | "\n", 125 | "### Redis\n", 126 | "\n", 127 | "An open-source, in-memory data structure store.\n", 128 | "\n", 129 | "#### Use Cases\n", 130 | "\n", 131 | "- LRU Cache.\n", 132 | "- Complex Data Structures.\n", 133 | "\n", 134 | "#### See Also\n", 135 | "\n", 136 | "- [Home Page](https://redis.io/)\n", 137 | "- [GitHub](https://github.com/antirez/redis)\n", 138 | "\n", 139 | "### RocksDB\n", 140 | "\n", 141 | "An open-source, embeddable persistent key-value store based on Google's LevelDB.\n", 142 | "\n", 143 | "#### Use Cases\n", 144 | "\n", 145 | "- Localized State.\n", 146 | "- Low-Latency Embeddable Cache.\n", 147 | "\n", 148 | "#### See Also\n", 149 | "\n", 150 | "- [Home Page](https://rocksdb.org/)\n", 151 | "- [GitHub](https://github.com/facebook/rocksdb)\n", 152 | "\n", 153 | "### TiDB\n", 154 | "\n", 155 | "An open-source, distributed NewSQL OLTP/OLAP database based on Google's Percolator to provide CP guarantees and ACID transactions.\n", 156 | "\n", 157 | "#### Use Cases\n", 158 | "\n", 159 | "- MySQL Replacement (Wire-Protocol Compatible).\n", 160 | "- Distributed SQL.\n", 161 | "- ACID Transactions.\n", 162 | "\n", 163 | "#### See Also\n", 164 | "\n", 165 | "- [Home Page](https://pingcap.com/en/)\n", 166 | "- [GitHub](https://github.com/pingcap/tidb)\n", 167 | "\n", 168 | "### ZooKeeper\n", 169 | "\n", 170 | "An open-source, distributed hierarchical key-value store to provide CP guarantees.\n", 171 | "\n", 172 | "#### Use Cases\n", 173 | "\n", 174 | "- Distributed Configurations.\n", 175 | "- Distributed Coordination.\n", 176 | "- Naming Service.\n", 177 | "- Leadership Election.\n", 178 | "\n", 179 | "#### See Also\n", 180 | "\n", 181 | "- [Home Page](https://zookeeper.apache.org/)\n", 182 | "- [GitHub](https://github.com/apache/zookeeper)" 183 | ] 184 | }, 185 | { 186 | "cell_type": "markdown", 187 | "metadata": {}, 188 | "source": [ 189 | "## Processing\n", 190 | "\n", 191 | "### Flink\n", 192 | "\n", 193 | "An open-source, distributed streaming data-flow engine.\n", 194 | "\n", 195 | "#### Use Cases\n", 196 | "\n", 197 | "- Streaming ETL.\n", 198 | "- Streaming SQL.\n", 199 | "- Event-Driven Applications.\n", 200 | "- Stateful Applications.\n", 201 | "\n", 202 | "#### See Also\n", 203 | "\n", 204 | "- [Home Page](https://flink.apache.org/)\n", 205 | "- [GitHub](https://github.com/apache/flink)\n", 206 | "\n", 207 | "### Spark\n", 208 | "\n", 209 | "An open-source, distributed general-purpose cluster-computing framework.\n", 210 | "\n", 211 | "#### Use Cases\n", 212 | "\n", 213 | "- Batch ETL.\n", 214 | "- Batch SQL.\n", 215 | "- Data Mining.\n", 216 | "\n", 217 | "#### See Also\n", 218 | "\n", 219 | "- [Home Page](https://spark.apache.org/)\n", 220 | "- [GitHub](https://github.com/apache/spark)" 221 | ] 222 | }, 223 | { 224 | "cell_type": "markdown", 225 | "metadata": {}, 226 | "source": [ 227 | "## Scheduling\n", 228 | "\n", 229 | "### Airflow\n", 230 | "\n", 231 | "An open-source platform to programmatically author, schedule and monitor workflows.\n", 232 | "\n", 233 | "#### Use Cases\n", 234 | "\n", 235 | "- Scheduling ETL Jobs.\n", 236 | "- Scheduling Machine Learning Jobs.\n", 237 | "- Coordinating Data Pipelines.\n", 238 | "\n", 239 | "#### See Also\n", 240 | "\n", 241 | "- [Home Page](https://airflow.apache.org/)\n", 242 | "- [GitHub](https://github.com/apache/airflow)" 243 | ] 244 | }, 245 | { 246 | "cell_type": "markdown", 247 | "metadata": {}, 248 | "source": [ 249 | "## Serialization\n", 250 | "\n", 251 | "### Arrow\n", 252 | "\n", 253 | "An open-source, language-independent columnar memory format for flat and hierarchical data.\n", 254 | "\n", 255 | "#### Use Cases\n", 256 | "\n", 257 | "- In-Memory Analytics.\n", 258 | "\n", 259 | "#### See Also\n", 260 | "\n", 261 | "- [Home Page](https://arrow.apache.org/)\n", 262 | "- [GitHub](https://github.com/apache/arrow)\n", 263 | "\n", 264 | "### Avro\n", 265 | "\n", 266 | "An open-source, remote procedure call and data serialization framework.\n", 267 | "\n", 268 | "#### Use Cases\n", 269 | "\n", 270 | "- Streaming Analytics.\n", 271 | "- Schema Evolution.\n", 272 | "\n", 273 | "#### See Also\n", 274 | "\n", 275 | "- [Home Page](https://avro.apache.org/)\n", 276 | "- [GitHub](https://github.com/apache/avro)\n", 277 | "\n", 278 | "### Parquet\n", 279 | "\n", 280 | "An open-source, columnar storage format.\n", 281 | "\n", 282 | "#### Use Cases\n", 283 | "\n", 284 | "- Batched Analytics.\n", 285 | "\n", 286 | "#### See Also\n", 287 | "\n", 288 | "- [Home Page](https://parquet.apache.org/)\n", 289 | "- [GitHub](https://github.com/apache/parquet-format)" 290 | ] 291 | }, 292 | { 293 | "cell_type": "markdown", 294 | "metadata": {}, 295 | "source": [ 296 | "## Storage\n", 297 | "\n", 298 | "### Alluxio\n", 299 | "\n", 300 | "An open-source, virtual memory distributed file system.\n", 301 | "\n", 302 | "#### Use Cases\n", 303 | "\n", 304 | "- Storage Abstraction.\n", 305 | "- Remote Data Access Acceleration.\n", 306 | "\n", 307 | "#### See Also\n", 308 | "\n", 309 | "- [Home Page](https://www.alluxio.org/)\n", 310 | "- [GitHub](https://github.com/Alluxio/alluxio)\n", 311 | "\n", 312 | "### Hadoop Distributed File System\n", 313 | "\n", 314 | "An open-source, distributed file-system over commodity machines.\n", 315 | "\n", 316 | "#### Use Cases\n", 317 | "\n", 318 | "- Bare-Metal Data Center.\n", 319 | "\n", 320 | "#### See Also\n", 321 | "\n", 322 | "- [Home Page](http://hadoop.apache.org/)\n", 323 | "- [GitHub](https://github.com/apache/hadoop)\n", 324 | "\n", 325 | "### S3\n", 326 | "\n", 327 | "A proprietary, distributed file-system with four nines of availability.\n", 328 | "\n", 329 | "#### Use Cases\n", 330 | "\n", 331 | "- AWS.\n", 332 | "\n", 333 | "#### See Also\n", 334 | "\n", 335 | "- [Home Page](https://aws.amazon.com/s3/)" 336 | ] 337 | } 338 | ], 339 | "metadata": { 340 | "kernelspec": { 341 | "display_name": "Python 3", 342 | "language": "python", 343 | "name": "python3" 344 | }, 345 | "language_info": { 346 | "codemirror_mode": { 347 | "name": "ipython", 348 | "version": 3 349 | }, 350 | "file_extension": ".py", 351 | "mimetype": "text/x-python", 352 | "name": "python", 353 | "nbconvert_exporter": "python", 354 | "pygments_lexer": "ipython3", 355 | "version": "3.6.5" 356 | } 357 | }, 358 | "nbformat": 4, 359 | "nbformat_minor": 2 360 | } 361 | -------------------------------------------------------------------------------- /Books/Anomaly Detection Principles and Algorithms/images/AC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Anomaly Detection Principles and Algorithms/images/AC.png -------------------------------------------------------------------------------- /Books/Anomaly Detection Principles and Algorithms/images/DBSCAN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Anomaly Detection Principles and Algorithms/images/DBSCAN.png -------------------------------------------------------------------------------- /Books/Anomaly Detection Principles and Algorithms/images/DC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Anomaly Detection Principles and Algorithms/images/DC.png -------------------------------------------------------------------------------- /Books/Anomaly Detection Principles and Algorithms/images/FKMC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Anomaly Detection Principles and Algorithms/images/FKMC.png -------------------------------------------------------------------------------- /Books/Anomaly Detection Principles and Algorithms/images/KMC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Anomaly Detection Principles and Algorithms/images/KMC.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_10_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_10_2.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_10_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_10_3.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_11_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_11_34.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_11_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_11_9.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_10.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_3.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_5.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_6.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_7.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_ESM_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_ESM_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_ESM_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_ESM_2.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_12_INLJ_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_12_INLJ_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_12.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_14.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_15.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_2.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_14_CS_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_14_CS_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_10.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_15.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_16.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_4.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_15_WFG_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_15_WFG_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_16_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_16_5.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_1_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_1_5.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_20_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_20_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_20_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_20_2.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_20_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_20_3.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_20_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_20_4.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_10.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_11.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_12.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_14.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_2.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_21.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_3.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_5.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_6.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_8.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_9.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_7_RS_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_7_RS_1.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_8_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_8_11.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_8_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_8_12.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_8_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_8_7.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_8_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_8_8.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_8_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_8_9.png -------------------------------------------------------------------------------- /Books/Database System Concepts/images/Figure_A_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Database System Concepts/images/Figure_A_2.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Beta_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Beta_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Cauchy_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Cauchy_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Exponential_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Exponential_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_1_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_1_4.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_1_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_1_5.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_1_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_1_7.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_1_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_1_8.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_2_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_2_15.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Figure_6_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Figure_6_1.png -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Gamma_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Gamma_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Normal_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Normal_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Uniform_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Uniform_PDF.gif -------------------------------------------------------------------------------- /Books/Probability and Statistics for Computer Science/images/Weibull_PDF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Books/Probability and Statistics for Computer Science/images/Weibull_PDF.gif -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_1.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_15.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_2.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_3.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_4.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_5.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F01_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F01_6.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F02_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F02_3.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F02_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F02_38.png -------------------------------------------------------------------------------- /Courses/ECE405/images/F02_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE405/images/F02_7.png -------------------------------------------------------------------------------- /Courses/ECE454/ECE454 Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/ECE454 Notes.pdf -------------------------------------------------------------------------------- /Courses/ECE454/images/2PC_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/2PC_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/2PC_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/2PC_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Architecture_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Architecture_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Architecture_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Architecture_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Architecture_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Architecture_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Architecture_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Architecture_4.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Architecture_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Architecture_5.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Clocks_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Clocks_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Communication_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Communication_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Communication_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Communication_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Communication_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Communication_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Consistency_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Consistency_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Consistency_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Consistency_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Consistency_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Consistency_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Consistency_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Consistency_4.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_4.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_5.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_6.png -------------------------------------------------------------------------------- /Courses/ECE454/images/DFS_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/DFS_7.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Fault_Tolerance_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Fault_Tolerance_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Fault_Tolerance_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Fault_Tolerance_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Fault_Tolerance_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Fault_Tolerance_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Hadoop_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Hadoop_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Hadoop_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Hadoop_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Hadoop_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Hadoop_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Kafka_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Kafka_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Processes_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Processes_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Processes_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Processes_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Processes_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Processes_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Raft_Algorithm_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Raft_Algorithm_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Raft_Algorithm_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Raft_Algorithm_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Raft_Algorithm_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Raft_Algorithm_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Replication_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Replication_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Replication_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Replication_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Replication_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Replication_3.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Spark_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Spark_1.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Spark_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Spark_2.png -------------------------------------------------------------------------------- /Courses/ECE454/images/Spark_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE454/images/Spark_3.png -------------------------------------------------------------------------------- /Courses/ECE457A/ECE457A Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/ECE457A Notes.pdf -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_1.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_10.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_11.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_12.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_13.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_14.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_2.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_3.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_4.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_5.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_6.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_7.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_8.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/GA_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/GA_9.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/Metaheuristics_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/Metaheuristics_1.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/Minimax_Algorithm_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/Minimax_Algorithm_1.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/PSO_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/PSO_1.png -------------------------------------------------------------------------------- /Courses/ECE457A/images/Simulated_Annealing_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE457A/images/Simulated_Annealing_1.png -------------------------------------------------------------------------------- /Courses/ECE493/ECE493 Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/ECE493 Notes.pdf -------------------------------------------------------------------------------- /Courses/ECE493/images/BL_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/BL_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/BN_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/BN_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/BN_P1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/BN_P1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/BN_P2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/BN_P2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_4.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_5.png -------------------------------------------------------------------------------- /Courses/ECE493/images/DP_RL_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/DP_RL_6.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MC_RL_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MC_RL_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MC_RL_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MC_RL_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MC_RL_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MC_RL_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MC_RL_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MC_RL_4.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MC_RL_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MC_RL_5.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MDP_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MDP_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MDP_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MDP_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MDP_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MDP_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MDP_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MDP_4.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MDP_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MDP_5.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MRF_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MRF_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MRF_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MRF_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MRF_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MRF_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MS_RL_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MS_RL_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MS_RL_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MS_RL_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MS_RL_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MS_RL_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MS_RL_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MS_RL_4.png -------------------------------------------------------------------------------- /Courses/ECE493/images/MS_RL_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/MS_RL_5.png -------------------------------------------------------------------------------- /Courses/ECE493/images/NN_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/NN_1.jpg -------------------------------------------------------------------------------- /Courses/ECE493/images/NN_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/NN_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_4.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_5.png -------------------------------------------------------------------------------- /Courses/ECE493/images/PG_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/PG_6.png -------------------------------------------------------------------------------- /Courses/ECE493/images/TD_RL_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/TD_RL_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/TD_RL_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/TD_RL_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/TD_RL_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/TD_RL_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/TS_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/TS_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VA_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VA_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VA_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VA_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VA_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VA_3.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VE_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VE_1.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VE_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VE_2.png -------------------------------------------------------------------------------- /Courses/ECE493/images/VE_P1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Courses/ECE493/images/VE_P1.png -------------------------------------------------------------------------------- /Data Structures and Algorithms/1. Java Standard Library.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Java Standard Library\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "## Java™ Platform, Standard Edition 8 API Specification\n", 16 | "- [ArrayDeque](https://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html)\n", 17 | " - `offer(E e)` - Inserts the specified element at the end of this deque.\n", 18 | " - `poll()` - Retrieves and removes the head of the queue represented by this deque.\n", 19 | " - `peekFirst()` - Retrieves, but does not remove, the first element of this deque, or returns null if this deque is empty.\n", 20 | " - `push(E e)` - Pushes an element onto the stack represented by this deque.\n", 21 | " - `pop()` - Pops an element from the stack represented by this deque.\n", 22 | " - `peekLast()` - Retrieves, but does not remove, the last element of this deque, or returns null if this deque is empty.\n", 23 | "- [ArrayList](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html)\n", 24 | " - `add(E e)` - Appends the specified element to the end of this list.\n", 25 | " - `add(int index, E element)` - Inserts the specified element at the specified position in this list.\n", 26 | " - `get(int index)` - Returns the element at the specified position in this list.\n", 27 | " - `remove(int index)` - Removes the element at the specified position in this list.\n", 28 | " - `set(int index, E element)` - Replaces the element at the specified position in this list with the specified element.\n", 29 | " - `subList(int fromIndex, int toIndex)` - Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.\n", 30 | "- [Arrays](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html)\n", 31 | " - `asList(T... a)` - Returns a fixed-size list backed by the specified array.\n", 32 | " - `binarySearch(int[] a, int key)` - Searches the specified array of ints for the specified value using the binary search algorithm.\n", 33 | " - `binarySearch(int[] a, int fromIndex, int toIndex, int key)` - Searches a range of the specified array of ints for the specified value using the binary search algorithm.\n", 34 | " - `copyOf(int[] original, int newLength)` - Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.\n", 35 | " - `copyOfRange(int[] original, int from, int to)` - Copies the specified range of the specified array into a new array.\n", 36 | " - `equals(int[] a, int[] a2)` - Returns true if the two specified arrays of ints are equal to one another.\n", 37 | " - `fill(int[] a, int val)` - Assigns the specified int value to each element of the specified array of ints.\n", 38 | " - `fill(int[] a, int fromIndex, int toIndex, int val)` - Assigns the specified int value to each element of the specified range of the specified array of ints.\n", 39 | " - `hashCode(int[] a)` - Returns a hash code based on the contents of the specified array.\n", 40 | " - `sort(int[] a)` - Sorts the specified array into ascending numerical order.\n", 41 | " - `sort(int[] a, int fromIndex, int toIndex)` - Sorts the specified range of the array into ascending order.\n", 42 | " - `toString(int[] a)` - Returns a string representation of the contents of the specified array.\n", 43 | "- [BigInteger](https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html)\n", 44 | " - `gcd(BigInteger val)` - Returns a `BigInteger` whose value is the greatest common divisor of `abs(this)` and `abs(val)`.\n", 45 | " - `isProbablePrime(int certainty)` - Returns true if this `BigInteger` is probably prime, false if it's definitely composite.\n", 46 | " - `nextProbablePrime()` - Returns the first integer greater than this BigInteger that is probably prime.\n", 47 | "- [BitSet](https://docs.oracle.com/javase/8/docs/api/java/util/BitSet.html)\n", 48 | " - `cardinality()` - Returns the number of bits set to true in this `BitSet`.\n", 49 | " - `clear(int bitIndex)` - Sets the bit specified by the index to false.\n", 50 | " - `flip(int bitIndex)` - Sets the bit at the specified index to the complement of its current value.\n", 51 | " - `get(int bitIndex)` - Returns the value of the bit with the specified index.\n", 52 | " - `nextClearBit(int fromIndex)` - Returns the index of the first bit that is set to false that occurs on or after the specified starting index.\n", 53 | " - `nextSetBit(int fromIndex)` - Returns the index of the first bit that is set to true that occurs on or after the specified starting index.\n", 54 | " - `previousClearBit(int fromIndex)` - Returns the index of the nearest bit that is set to false that occurs on or before the specified starting index.\n", 55 | " - `previousSetBit(int fromIndex)` - Returns the index of the nearest bit that is set to true that occurs on or before the specified starting index.\n", 56 | " - `set(int bitIndex)` - Sets the bit at the specified index to true.\n", 57 | "- [Collections](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html)\n", 58 | " - `binarySearch(List> list, T key)` - Searches the specified list for the specified object using the binary search algorithm.\n", 59 | " - `copy(List dest, List src)` - Copies all of the elements from one list into another.\n", 60 | " - `disjoint(Collection c1, Collection c2)` - Returns true if the two specified collections have no elements in common.\n", 61 | " - `fill(List list, T obj)` - Replaces all of the elements of the specified list with the specified element.\n", 62 | " - `frequency(Collection c, Object o)` - Returns the number of elements in the specified collection equal to the specified object.\n", 63 | " - `indexOfSubList(List source, List target)` - Returns the starting position of the first occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.\n", 64 | " - `lastIndexOfSubList(List source, List target)` - Returns the starting position of the last occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.\n", 65 | " - `max(Collection coll, Comparator comp)` - Returns the maximum element of the given collection, according to the order induced by the specified comparator.\n", 66 | " - `min(Collection coll, Comparator comp)` - Returns the minimum element of the given collection, according to the order induced by the specified comparator.\n", 67 | " - `reverse(List list)` - Reverses the order of the elements in the specified list.\n", 68 | " - `rotate(List list, int distance)`- Rotates the elements in the specified list by the specified distance.\n", 69 | " - `shuffle(List list)` - Randomly permutes the specified list using a default source of randomness.\n", 70 | " - `sort(List list, Comparator c)` - Sorts the specified list according to the order induced by the specified comparator.\n", 71 | " - `swap(List list, int i, int j)` - Swaps the elements at the specified positions in the specified list.\n", 72 | "- [DoubleSummaryStatistics](https://docs.oracle.com/javase/8/docs/api/java/util/DoubleSummaryStatistics.html)\n", 73 | " - `accept(double value)` - Records another value into the summary information.\n", 74 | " - `combine(DoubleSummaryStatistics other)` - Combines the state of another `DoubleSummaryStatistics` into this one.\n", 75 | " - `getAverage()` - Returns the arithmetic mean of values recorded, or zero if no values have been recorded.\n", 76 | " - `getCount()` - Return the count of values recorded.\n", 77 | " - `getMax()` - Returns the maximum recorded value, `Double.NaN` if any recorded value was `NaN` or `Double.NEGATIVE_INFINITY` if no values were recorded.\n", 78 | " - `getMin()` - Returns the minimum recorded value, `Double.NaN` if any recorded value was `NaN` or `Double.POSITIVE_INFINITY` if no values were recorded.\n", 79 | " - `getSum()` - Returns the sum of values recorded, or zero if no values have been recorded.\n", 80 | "- [HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html)\n", 81 | " - `containsKey(Object key)` - Returns true if this map contains a mapping for the specified key.\n", 82 | " - `get(Object key)` - Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.\n", 83 | " - `put(K key, V value)` - Associates the specified value with the specified key in this map.\n", 84 | " - `remove(Object key)` - Removes the mapping for the specified key from this map if present.\n", 85 | "- [HashSet](https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html)\n", 86 | " - `add(E e)` - Adds the specified element to this set if it is not already present.\n", 87 | " - `addAll(Collection c)` - Adds all of the elements in the specified collection to this set if they're not already present.\n", 88 | " - `contains(Object o)` - Returns true if this set contains the specified element.\n", 89 | " - `containsAll(Collection c)` - Returns true if this set contains all of the elements of the specified collection.\n", 90 | " - `remove(Object o)` - Removes the specified element from this set if it is present.\n", 91 | " - `removeAll(Collection c)` - Removes from this set all of its elements that are contained in the specified collection.\n", 92 | " - `retainAll(Collection c)` - Retains only the elements in this set that are contained in the specified collection.\n", 93 | " - `size()` - Returns the number of elements in this set (its cardinality).\n", 94 | "- [LinkedList](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html)\n", 95 | " - `addFirst(E e)` - Inserts the specified element at the beginning of this list.\n", 96 | " - `addLast(E e)` - Appends the specified element to the end of this list.\n", 97 | " - `getFirst()` - Returns the first element in this list.\n", 98 | " - `getLast()` - Returns the last element in this list.\n", 99 | " - `removeFirst()` - Removes and returns the first element from this list.\n", 100 | " - `removeLast()` - Removes and returns the last element from this list.\n", 101 | " - `descendingIterator()` - Returns an iterator over the elements in this deque in reverse sequential order.\n", 102 | " - `iterator()` - Returns an iterator over elements of type `T`.\n", 103 | "- [Math](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html)\n", 104 | " - `abs(double a)` - Returns the absolute value of a double value.\n", 105 | " - `ceil(double a)` - Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer.\n", 106 | " - `floor(double a)` - Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer.\n", 107 | " - `max(double a, double b)` - Returns the greater of two double values.\n", 108 | " - `min(double a, double b)` - Returns the smaller of two double values.\n", 109 | " - `random()` - Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.\n", 110 | " - `round(double a)` - Returns the closest long to the argument, with ties rounding to positive infinity.\n", 111 | " - `signum(double d)` - Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.\n", 112 | "- [Objects](https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html)\n", 113 | " - `compare(T a, T b, Comparator c)` - Returns 0 if the arguments are identical and `c.compare(a, b)` otherwise.\n", 114 | " - `deepEquals(Object a, Object b)` - Returns true if the arguments are deeply equal to each other and false otherwise.\n", 115 | " - `equals(Object a, Object b)` - Returns true if the arguments are equal to each other and false otherwise.\n", 116 | " - `hash(Object... values)` - Generates a hash code for a sequence of input values.\n", 117 | "- [PriorityQueue](https://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html)\n", 118 | " - `offer(E e)` - Inserts the specified element into this priority queue.\n", 119 | " - `peek()` - Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.\n", 120 | " - `poll()` - Retrieves and removes the head of this queue, or returns null if this queue is empty.\n", 121 | "- [Scanner](https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html)\n", 122 | " - `findInLine(String pattern)` - Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.\n", 123 | " - `hasNext(String pattern)` - Returns true if the next token matches the pattern constructed from the specified string.\n", 124 | " - `next(String pattern)` - Returns the next token if it matches the pattern constructed from the specified string.\n", 125 | " - `skip(String pattern)` - Skips input that matches a pattern constructed from the specified string.\n", 126 | " - `useDelimiter(String pattern)` - Sets this scanner's delimiting pattern to a pattern constructed from the specified string.\n", 127 | "- [Stack](https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html)\n", 128 | " - `peek()` - Looks at the object at the top of this stack without removing it from the stack.\n", 129 | " - `pop()` - Removes the object at the top of this stack and returns that object as the value of this function.\n", 130 | " - `push(E item)` - Pushes an item onto the top of this stack.\n", 131 | "- [StringBuffer](https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html)\n", 132 | " - `append(CharSequence s)` - Appends the specified `CharSequence` to this character sequence.\n", 133 | " - `delete(int start, int end)` - Removes the characters in a substring of this sequence.\n", 134 | " - `indexOf(String str, int fromIndex)` - Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.\n", 135 | " - `insert(int dstOffset, CharSequence s, int start, int end)` - Inserts a subsequence of the specified `CharSequence` into this sequence.\n", 136 | " - `reverse()` - Causes this character sequence to be replaced by the reverse of the sequence.\n", 137 | " - `substring(int start, int end)` - Returns a new string that contains a subsequence of characters currently contained in this sequence.\n", 138 | " - `toString()` - Returns a string representing the data in this sequence.\n", 139 | "- [TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html)\n", 140 | " - `containsKey(Object key)` - Returns true if this map contains a mapping for the specified key.\n", 141 | " - `get(Object key)` - Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.\n", 142 | " - `put(K key, V value)` - Associates the specified value with the specified key in this map.\n", 143 | " - `remove(Object key)` - Removes the mapping for the specified key from this map if present.\n", 144 | " - `ceilingEntry(K key)` - Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key.\n", 145 | " - `floorEntry(K key)` - Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.\n", 146 | " - `firstEntry()` - Returns a key-value mapping associated with the least key in this map, or null if the map is empty.\n", 147 | " - `lastEntry()` - Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.\n", 148 | " - `higherEntry(K key)` - Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.\n", 149 | " - `lowerEntry(K key)` - Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.\n", 150 | " - `headMap(K toKey, boolean inclusive)` - Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) `toKey`.\n", 151 | " - `tailMap(K fromKey, boolean inclusive)` - Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) `fromKey`.\n", 152 | " - `subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)` - Returns a view of the portion of this map whose keys range from `fromKey` to `toKey`.\n", 153 | "- [TreeSet](https://docs.oracle.com/javase/8/docs/api/java/util/TreeSet.html)\n", 154 | " - `add(E e)` - Adds the specified element to this set if it is not already present.\n", 155 | " - `addAll(Collection c)` - Adds all of the elements in the specified collection to this set if they're not already present.\n", 156 | " - `contains(Object o)` - Returns true if this set contains the specified element.\n", 157 | " - `containsAll(Collection c)` - Returns true if this set contains all of the elements of the specified collection.\n", 158 | " - `remove(Object o)` - Removes the specified element from this set if it is present.\n", 159 | " - `removeAll(Collection c)` - Removes from this set all of its elements that are contained in the specified collection.\n", 160 | " - `retainAll(Collection c)` - Retains only the elements in this set that are contained in the specified collection.\n", 161 | " - `size()` - Returns the number of elements in this set (its cardinality).\n", 162 | " - `ceiling(E e)` - Returns the least element in this set greater than or equal to the given element, or null if there is no such element.\n", 163 | " - `floor(E e)` - Returns the greatest element in this set less than or equal to the given element, or null if there is no such element.\n", 164 | " - `first()` - Returns the first (lowest) element currently in this set.\n", 165 | " - `last()` - Returns the last (highest) element currently in this set.\n", 166 | " - `higher(E e)` - Returns the least element in this set strictly greater than the given element, or null if there is no such element.\n", 167 | " - `lower(E e)` - Returns the greatest element in this set strictly less than the given element, or null if there is no such element.\n", 168 | " - `headSet(E toElement, boolean inclusive)` - Returns a view of the portion of this set whose elements are less than (or equal to, if inclusive is true) `toElement`.\n", 169 | " - `tailSet(E fromElement, boolean inclusive)` - Returns a view of the portion of this set whose elements are greater than (or equal to, if inclusive is true) `fromElement`.\n", 170 | " - `subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)` - Returns a view of the portion of this set whose elements range from `fromElement` to `toElement`." 171 | ] 172 | }, 173 | { 174 | "cell_type": "markdown", 175 | "metadata": {}, 176 | "source": [ 177 | "## Recommended Imports" 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": 1, 183 | "metadata": {}, 184 | "outputs": [ 185 | { 186 | "data": { 187 | "text/plain": [ 188 | "null" 189 | ] 190 | }, 191 | "execution_count": 1, 192 | "metadata": {}, 193 | "output_type": "execute_result" 194 | } 195 | ], 196 | "source": [ 197 | "import java.lang.Math;\n", 198 | "import java.util.*;\n", 199 | "import java.util.Arrays.*;\n", 200 | "import java.util.Collections.*;" 201 | ] 202 | }, 203 | { 204 | "cell_type": "markdown", 205 | "metadata": {}, 206 | "source": [ 207 | "## Recommended Console Input" 208 | ] 209 | }, 210 | { 211 | "cell_type": "code", 212 | "execution_count": 2, 213 | "metadata": {}, 214 | "outputs": [ 215 | { 216 | "data": { 217 | "text/plain": [ 218 | "null" 219 | ] 220 | }, 221 | "execution_count": 2, 222 | "metadata": {}, 223 | "output_type": "execute_result" 224 | } 225 | ], 226 | "source": [ 227 | "import java.util.*;\n", 228 | "\n", 229 | "final Scanner scanner = new Scanner(System.in);" 230 | ] 231 | }, 232 | { 233 | "cell_type": "markdown", 234 | "metadata": {}, 235 | "source": [ 236 | "## Recommended Console Output" 237 | ] 238 | }, 239 | { 240 | "cell_type": "code", 241 | "execution_count": 3, 242 | "metadata": {}, 243 | "outputs": [ 244 | { 245 | "name": "stdout", 246 | "output_type": "stream", 247 | "text": [ 248 | "Hello Jacob! It's 2018!\n" 249 | ] 250 | }, 251 | { 252 | "data": { 253 | "text/plain": [ 254 | "null" 255 | ] 256 | }, 257 | "execution_count": 3, 258 | "metadata": {}, 259 | "output_type": "execute_result" 260 | } 261 | ], 262 | "source": [ 263 | "import java.util.*;\n", 264 | "\n", 265 | "System.out.println(String.format(\"Hello %s! It's %d!\", \"Jacob\", 2018));" 266 | ] 267 | } 268 | ], 269 | "metadata": { 270 | "kernelspec": { 271 | "display_name": "Java", 272 | "language": "java", 273 | "name": "java" 274 | }, 275 | "language_info": { 276 | "codemirror_mode": "text/x-java", 277 | "file_extension": ".java", 278 | "mimetype": "", 279 | "name": "Java", 280 | "nbconverter_exporter": "", 281 | "version": "11.0.1" 282 | }, 283 | "toc": { 284 | "base_numbering": 1, 285 | "nav_menu": {}, 286 | "number_sections": false, 287 | "sideBar": false, 288 | "skip_h1_title": false, 289 | "title_cell": "Table of Contents", 290 | "title_sidebar": "Contents", 291 | "toc_cell": false, 292 | "toc_position": {}, 293 | "toc_section_display": false, 294 | "toc_window_display": false 295 | } 296 | }, 297 | "nbformat": 4, 298 | "nbformat_minor": 2 299 | } 300 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/10. Strings.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Strings\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "A string is a zero-indexed array of $n$ characters.\n", 16 | "\n", 17 | "- **Substring**: A consecutive sequence of characters in a string.\n", 18 | " - e.g., 'TOM' is a substring of 'PSYCHOTOMIMETIC'.\n", 19 | "- **Subsequence**: A monotonic sequence of chracters in a string.\n", 20 | " - e.g., 'TMM' is a subsequence of 'PSYCHOTOMIMETIC'.\n", 21 | "- **Prefix**: A substring containing the first character of a string.\n", 22 | " - e.g., 'PSYCHO' is a prefix of 'PSYCHOTOMIMETIC'.\n", 23 | "- **Suffix**: A substring containing the last character of a string.\n", 24 | " - e.g., 'MIMETIC' is a suffix of 'PSYCHOTOMIMETIC'." 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": {}, 30 | "source": [ 31 | "## Polynomial Hashing ($O(n)$)\n", 32 | "[See Link](https://en.wikipedia.org/wiki/Rolling_hash).\n", 33 | "$$\n", 34 | "\\begin{align}\n", 35 | "H(\\text{s}) &= \\sum_{i=0}^{n-1} \\text{s}\\left[i\\right] \\cdot p^{i} \\pmod m \\\\\n", 36 | "\\text{h}\\left[0\\right] &= \\text{s}\\left[0\\right] \\\\\n", 37 | "\\text{h}\\left[k\\right] &= \\left(\\text{h}\\left[k-1\\right] \\cdot p + \\text{s}\\left[k\\right]\\right) \\pmod m\\\\\n", 38 | "\\text{p}\\left[0\\right] &= 1 \\\\\n", 39 | "\\text{p}\\left[k\\right] &= \\left(\\text{p}\\left[k-1\\right] \\cdot p\\right) \\pmod m \\\\\n", 40 | "H(\\text{s}\\left[a...b\\right]) &= \\left(\\text{h}\\left[b\\right] - \\text{h}\\left[a-1\\right] \\cdot \\text{p}\\left[b-a+1\\right]\\right) \\pmod m\n", 41 | "\\end{align}\n", 42 | "$$" 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": 1, 48 | "metadata": {}, 49 | "outputs": [ 50 | { 51 | "data": { 52 | "text/plain": [ 53 | "strings.polynomial_hashing.PolynomialHasher" 54 | ] 55 | }, 56 | "execution_count": 1, 57 | "metadata": {}, 58 | "output_type": "execute_result" 59 | } 60 | ], 61 | "source": [ 62 | "package strings.polynomial_hashing;\n", 63 | "\n", 64 | "import java.util.*;\n", 65 | "\n", 66 | "public class PolynomialHasher {\n", 67 | "\n", 68 | " private static final long PA = 31;\n", 69 | " private static final long PB = 37;\n", 70 | " private static final long MA = (long) (1E9 + 7);\n", 71 | " private static final long MB = (long)(1E9 + 9);\n", 72 | "\n", 73 | " private final String string;\n", 74 | " private final long[] powers;\n", 75 | " private final long[] hashes;\n", 76 | " private final long p;\n", 77 | " private final long m;\n", 78 | "\n", 79 | " public PolynomialHasher(String string, boolean alphaFlag) {\n", 80 | " this.string = string;\n", 81 | " this.powers = new long[string.length()];\n", 82 | " this.hashes = new long[string.length()];\n", 83 | " this.p = (alphaFlag) ? PA : PB;\n", 84 | " this.m = (alphaFlag) ? MA : MB;\n", 85 | " initialize();\n", 86 | " }\n", 87 | "\n", 88 | " private void initialize() {\n", 89 | " if (string.isEmpty()) {\n", 90 | " return;\n", 91 | " }\n", 92 | " powers[0] = 1;\n", 93 | " hashes[0] = string.charAt(0);\n", 94 | " for (int index = 1; index < string.length(); index++) {\n", 95 | " powers[index] = (powers[index - 1] * p) % m;\n", 96 | " hashes[index] = (hashes[index - 1] * p + string.charAt(index)) % m;\n", 97 | " }\n", 98 | " }\n", 99 | "\n", 100 | " public long hash(int beginIndex, int endIndex) {\n", 101 | " if (beginIndex < 0 || beginIndex > endIndex || endIndex > string.length()) {\n", 102 | " throw new IllegalArgumentException();\n", 103 | " }\n", 104 | " if (string.isEmpty()) {\n", 105 | " return 0;\n", 106 | " }\n", 107 | " if (beginIndex == 0) {\n", 108 | " return hashes[endIndex];\n", 109 | " } else {\n", 110 | " // Note: Java's % operator returns the remainder which can be negative.\n", 111 | " // Accordingly, A mod B == ((A % B) + B) % B\n", 112 | " return ((hashes[endIndex] - hashes[beginIndex - 1] * powers[endIndex - beginIndex + 1]) % m + m) % m;\n", 113 | " }\n", 114 | " }\n", 115 | "}" 116 | ] 117 | }, 118 | { 119 | "cell_type": "markdown", 120 | "metadata": {}, 121 | "source": [ 122 | "### Application: Pattern Matching ($O(n)$)\n", 123 | "1. Generate polynomial hashes of the pattern and the text with $O(n)$ space and time complexities.\n", 124 | "2. Slide the text's indices with a window length of the pattern, and if the hash of the text substring matches the hash of the pattern, then the pattern matched." 125 | ] 126 | }, 127 | { 128 | "cell_type": "code", 129 | "execution_count": 2, 130 | "metadata": {}, 131 | "outputs": [ 132 | { 133 | "name": "stdout", 134 | "output_type": "stream", 135 | "text": [ 136 | "Pattern Matched [beginIndex=14, endIndex=24]\n" 137 | ] 138 | }, 139 | { 140 | "data": { 141 | "text/plain": [ 142 | "null" 143 | ] 144 | }, 145 | "execution_count": 2, 146 | "metadata": {}, 147 | "output_type": "execute_result" 148 | } 149 | ], 150 | "source": [ 151 | "package strings.polynomial_hashing;\n", 152 | "\n", 153 | "import java.util.*;\n", 154 | "\n", 155 | "final String pattern = \"abracadabra\";\n", 156 | "final String text = \"abacadabrabracabracadabrabrabracad\";\n", 157 | "\n", 158 | "final PolynomialHasher patternHasher = new PolynomialHasher(pattern, true);\n", 159 | "final PolynomialHasher textHasher = new PolynomialHasher(text, true);\n", 160 | "\n", 161 | "final long patternHash = patternHasher.hash(0, pattern.length() - 1);\n", 162 | "for (int beginIndex = 0; beginIndex <= text.length() - pattern.length(); beginIndex++) {\n", 163 | " final int endIndex = beginIndex + pattern.length() - 1;\n", 164 | " final long textSubstringHash = textHasher.hash(beginIndex, endIndex);\n", 165 | " if (patternHash == textSubstringHash) {\n", 166 | " System.out.println(String.format(\n", 167 | " \"Pattern Matched [beginIndex=%d, endIndex=%d]\", beginIndex, endIndex));\n", 168 | " break;\n", 169 | " }\n", 170 | "}" 171 | ] 172 | }, 173 | { 174 | "cell_type": "markdown", 175 | "metadata": {}, 176 | "source": [ 177 | "## Suffix Array ($O(n \\log n \\log n)$)\n", 178 | "[See Link](https://en.wikipedia.org/wiki/Suffix_array)." 179 | ] 180 | }, 181 | { 182 | "cell_type": "markdown", 183 | "metadata": {}, 184 | "source": [ 185 | "- A Suffix Array is used to answer pattern matching queries about a string.\n", 186 | "- A Suffix Array is an array that contains the starting indices of all the $n$ sorted suffixes of $S$." 187 | ] 188 | }, 189 | { 190 | "cell_type": "code", 191 | "execution_count": 3, 192 | "metadata": {}, 193 | "outputs": [ 194 | { 195 | "data": { 196 | "text/plain": [ 197 | "strings.suffix_array.SuffixArray" 198 | ] 199 | }, 200 | "execution_count": 3, 201 | "metadata": {}, 202 | "output_type": "execute_result" 203 | } 204 | ], 205 | "source": [ 206 | "package strings.suffix_array;\n", 207 | "\n", 208 | "import java.util.*;\n", 209 | "\n", 210 | "public class SuffixArray {\n", 211 | "\n", 212 | " private final String string;\n", 213 | " private final int[] indices;\n", 214 | "\n", 215 | " public SuffixArray(String string) {\n", 216 | " this.string = string;\n", 217 | " this.indices = new SuffixComparator(string).compute();\n", 218 | " }\n", 219 | "\n", 220 | " /**\n", 221 | " * Returns the index of the 'i'th smallest suffix.\n", 222 | " */\n", 223 | " public int index(int index) {\n", 224 | " return indices[index];\n", 225 | " }\n", 226 | "\n", 227 | " /**\n", 228 | " * Returns the 'i'th smallest suffix.\n", 229 | " */\n", 230 | " public String select(int index) {\n", 231 | " return string.substring(indices[index]);\n", 232 | " }\n", 233 | "\n", 234 | " /**\n", 235 | " * Returns the number of suffixes strictly less than the query.\n", 236 | " */\n", 237 | " public int rank(String query) {\n", 238 | " int headIndex = 0;\n", 239 | " int tailIndex = string.length() - 1;\n", 240 | " while (headIndex <= tailIndex) {\n", 241 | " final int medianIndex = headIndex + (tailIndex - headIndex) / 2;\n", 242 | " final int comparison = compare(query, indices[medianIndex]);\n", 243 | " if (comparison < 0) {\n", 244 | " tailIndex = medianIndex - 1;\n", 245 | " } else if (comparison > 0) {\n", 246 | " headIndex = medianIndex + 1;\n", 247 | " } else {\n", 248 | " return medianIndex;\n", 249 | " }\n", 250 | " }\n", 251 | " return headIndex;\n", 252 | " }\n", 253 | "\n", 254 | " /**\n", 255 | " * Returns whether the query is less than the suffix from medianIndex.\n", 256 | " */\n", 257 | " private int compare(String query, int medianIndex) {\n", 258 | " int iIndex = medianIndex;\n", 259 | " int jIndex = 0;\n", 260 | " while (iIndex < string.length() && jIndex < query.length()) {\n", 261 | " if (query.charAt(jIndex) != string.charAt(iIndex)) {\n", 262 | " return query.charAt(jIndex) - string.charAt(iIndex);\n", 263 | " }\n", 264 | " iIndex++;\n", 265 | " jIndex++;\n", 266 | " }\n", 267 | " if (iIndex < string.length()) {\n", 268 | " return -1;\n", 269 | " }\n", 270 | " if (jIndex < query.length()) {\n", 271 | " return +1;\n", 272 | " }\n", 273 | " return 0;\n", 274 | " }\n", 275 | "\n", 276 | " /**\n", 277 | " * Returns the length of the longest common prefix of the 'i'th smallest suffix and\n", 278 | " * the 'i'-1st smallest suffix.\n", 279 | " */\n", 280 | " public int lcpLength(int index) {\n", 281 | " int iIndex = indices[index];\n", 282 | " int jIndex = indices[index - 1];\n", 283 | " int length = 0;\n", 284 | " while (iIndex < string.length() && jIndex < string.length()) {\n", 285 | " if (string.charAt(iIndex) != string.charAt(jIndex)) {\n", 286 | " return length;\n", 287 | " }\n", 288 | " iIndex++;\n", 289 | " jIndex++;\n", 290 | " length++;\n", 291 | " }\n", 292 | " return length;\n", 293 | " }\n", 294 | " \n", 295 | " /**\n", 296 | " * Returns the LCP Array which stores the length of the longest common prefix between\n", 297 | " * all pairs of consecutive suffixes in a sorted suffix array, using the Kasai's\n", 298 | " * Algorithm in O(n).\n", 299 | " * Note: LCP(i,j) = Min(lcp[i], lcp[i+1], ..., lcp[j-1])\n", 300 | " */\n", 301 | " public int[] lcpArray() {\n", 302 | " final int[] lcp = new int[string.length()];\n", 303 | "\n", 304 | " final int[] inverseIndices = new int[string.length()];\n", 305 | " for (int index = 0; index < string.length(); index++) {\n", 306 | " inverseIndices[indices[index]] = index;\n", 307 | " }\n", 308 | "\n", 309 | " int length = 0;\n", 310 | " for (int iIndex = 0; iIndex < string.length(); iIndex++) {\n", 311 | " // Edge Case:\n", 312 | " if (inverseIndices[iIndex] == string.length() - 1) {\n", 313 | " length = 0;\n", 314 | " continue;\n", 315 | " }\n", 316 | "\n", 317 | " // Main Case:\n", 318 | " int jIndex = indices[inverseIndices[iIndex] + 1];\n", 319 | " while ((iIndex + length) < string.length() &&\n", 320 | " (jIndex + length) < string.length()) {\n", 321 | " if (string.charAt(iIndex) != string.charAt(jIndex)) {\n", 322 | " break;\n", 323 | " }\n", 324 | " length++;\n", 325 | " }\n", 326 | " lcp[inverseIndices[iIndex]] = length;\n", 327 | " if (length > 0) {\n", 328 | " length--;\n", 329 | " }\n", 330 | " }\n", 331 | "\n", 332 | " return lcp;\n", 333 | " }\n", 334 | "\n", 335 | " private static class SuffixComparator implements Comparator {\n", 336 | "\n", 337 | " private final String string;\n", 338 | " private final int[] currOrder;\n", 339 | " private final int[] nextOrder;\n", 340 | " private int size;\n", 341 | "\n", 342 | " public SuffixComparator(String string) {\n", 343 | " this.string = string;\n", 344 | " this.currOrder = new int[string.length()];\n", 345 | " this.nextOrder = new int[string.length()];\n", 346 | " this.size = 0;\n", 347 | " }\n", 348 | "\n", 349 | " public int[] compute() {\n", 350 | " final Integer[] indices = new Integer[string.length()];\n", 351 | "\n", 352 | " // Initialize:\n", 353 | " for (int index = 0; index < string.length(); index++) {\n", 354 | " indices[index] = index;\n", 355 | " currOrder[index] = string.charAt(index);\n", 356 | " nextOrder[index] = 0;\n", 357 | " }\n", 358 | "\n", 359 | " // Prefix Doubling Size Stable Sort:\n", 360 | " for (size = 1;\n", 361 | " nextOrder[string.length() - 1] != string.length() - 1;\n", 362 | " size <<= 1) {\n", 363 | " // If Radix Sort, Remove \\log N.\n", 364 | " Arrays.sort(indices, this);\n", 365 | " // Suffix of 2^(N+1) = Two Splits of 2^N => Ordering Changes If\n", 366 | " // First Splits Equivalent.\n", 367 | " for (int index = 0; index < string.length() - 1; index++) {\n", 368 | " nextOrder[index + 1] = nextOrder[index] +\n", 369 | " (compare(indices[index], indices[index + 1]) < 0 ? 1 : 0);\n", 370 | " }\n", 371 | " // Update Order:\n", 372 | " for (int index = 0; index < string.length(); index++) {\n", 373 | " currOrder[indices[index]] = nextOrder[index];\n", 374 | " }\n", 375 | " }\n", 376 | "\n", 377 | " // Unboxing:\n", 378 | " return Arrays.stream(indices).mapToInt(Integer::intValue).toArray();\n", 379 | " }\n", 380 | "\n", 381 | " @Override\n", 382 | " public int compare(Integer lIndex, Integer rIndex) {\n", 383 | " // Compare First Split:\n", 384 | " if (currOrder[lIndex] != currOrder[rIndex]) {\n", 385 | " return currOrder[lIndex] - currOrder[rIndex];\n", 386 | " }\n", 387 | " // Compare Second Split b/c Equivalent Prefixes:\n", 388 | " if ((lIndex += size) < string.length() &&\n", 389 | " (rIndex += size) < string.length()) {\n", 390 | " return currOrder[lIndex] - currOrder[rIndex];\n", 391 | " }\n", 392 | " return rIndex - lIndex;\n", 393 | " }\n", 394 | "\n", 395 | " }\n", 396 | "\n", 397 | "}" 398 | ] 399 | }, 400 | { 401 | "cell_type": "code", 402 | "execution_count": 4, 403 | "metadata": {}, 404 | "outputs": [ 405 | { 406 | "name": "stdout", 407 | "output_type": "stream", 408 | "text": [ 409 | "Sorted Suffixes:\n", 410 | "a\n", 411 | "ana\n", 412 | "anana\n", 413 | "banana\n", 414 | "na\n", 415 | "nana\n", 416 | "LCP Array: [1, 3, 0, 0, 2, 0]\n" 417 | ] 418 | }, 419 | { 420 | "data": { 421 | "text/plain": [ 422 | "null" 423 | ] 424 | }, 425 | "execution_count": 4, 426 | "metadata": {}, 427 | "output_type": "execute_result" 428 | } 429 | ], 430 | "source": [ 431 | "package strings.suffix_array;\n", 432 | "\n", 433 | "import java.util.*;\n", 434 | "\n", 435 | "// Suffixes:\n", 436 | "// 0 => banana\n", 437 | "// 1 => anana\n", 438 | "// 2 => nana\n", 439 | "// 3 => ana\n", 440 | "// 4 => na\n", 441 | "// 5 => a\n", 442 | "\n", 443 | "// Suffix Array:\n", 444 | "// 5 => a\n", 445 | "// 3 => ana\n", 446 | "// 1 => anana\n", 447 | "// 0 => banana\n", 448 | "// 4 => na\n", 449 | "// 2 => nana\n", 450 | "\n", 451 | "// LCP Array:\n", 452 | "// [1, 3, 0, 0, 2, 0]\n", 453 | "\n", 454 | "final String string = \"banana\";\n", 455 | "final SuffixArray suffixArray = new SuffixArray(string);\n", 456 | "\n", 457 | "System.out.println(\"Sorted Suffixes:\");\n", 458 | "for (int index = 0; index < string.length(); index++) {\n", 459 | " System.out.println(suffixArray.select(index));\n", 460 | "}\n", 461 | "\n", 462 | "final int[] lcpArray = suffixArray.lcpArray();\n", 463 | "System.out.printf(\"LCP Array: %s\\n\", Arrays.toString(lcpArray));" 464 | ] 465 | }, 466 | { 467 | "cell_type": "markdown", 468 | "metadata": {}, 469 | "source": [ 470 | "### Applications\n", 471 | "1. **Pattern Matching**: Rank Function of Suffix Array.\n", 472 | "2. **Longest Repeated Substring**: Maximum over LCP Array.\n", 473 | "3. **Longest Common Substring of 2 Strings**: Concatenate A and B for A#B + Maximum over LCP Array of A#B; # ~ Delimiter b/w A and B.\n", 474 | "4. **Longest Palindromic Substring**: Concatenate S and Reverse(S) for S#Reverse(S) + Mirror Two Indices in S and Reverse(S) + Find LCP of Same Length (?); # ~ Delimiter b/w S and Reverse(S)." 475 | ] 476 | } 477 | ], 478 | "metadata": { 479 | "kernelspec": { 480 | "display_name": "Java", 481 | "language": "java", 482 | "name": "java" 483 | }, 484 | "language_info": { 485 | "codemirror_mode": "text/x-java", 486 | "file_extension": ".java", 487 | "mimetype": "", 488 | "name": "Java", 489 | "nbconverter_exporter": "", 490 | "version": "1.8.0_152-release" 491 | }, 492 | "toc": { 493 | "base_numbering": 1, 494 | "nav_menu": {}, 495 | "number_sections": false, 496 | "sideBar": false, 497 | "skip_h1_title": false, 498 | "title_cell": "Table of Contents", 499 | "title_sidebar": "Contents", 500 | "toc_cell": false, 501 | "toc_position": {}, 502 | "toc_section_display": false, 503 | "toc_window_display": false 504 | } 505 | }, 506 | "nbformat": 4, 507 | "nbformat_minor": 5 508 | } 509 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/2. Data Structures.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Data Structures\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "## Arrays\n", 16 | "\n", 17 | "### Use\n", 18 | "- Constant Random Access.\n", 19 | "- Fixed Size.\n", 20 | "\n", 21 | "### See Also\n", 22 | "- [ArrayList](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html)\n", 23 | "- [Arrays](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html)\n", 24 | "\n", 25 | "### Advice\n", 26 | "\n", 27 | "- Array problems often have simple brute-force solutions that have $O(n)$ space complexity, but subtler solutions use the array itself to reduce space complexity to $O(1)$.\n", 28 | "- Filling an array from the front is slow, so see if it's possible to write values from the back.\n", 29 | "- Instead of deleting an entry (which requires moving all entries to its right), consider overwriting it with a tombstone.\n", 30 | "- Be comfortable with writing code that operates on subarrays.\n", 31 | "- Don't worry about preserving the integrity of the array (sortedness, etc...) until it's time to return.\n", 32 | "- A one-pass, range query algorithm can be generalized with *start*, *current*, and *end* indices of which each index is updated per cases qualifying the range.\n", 33 | "- A several-pass algorithm although slower than a one-pass algorithm still has $O(n)$ time complexity.\n", 34 | "\n", 35 | "### Square Root Optimization - \"Poor Man's Logarithm\"\n", 36 | "\n", 37 | "#### Background\n", 38 | "\n", 39 | "- In the study of time complexity, $O(\\log{n}) \\ll O(\\sqrt{n}) \\ll O(n)$.\n", 40 | "- Although for a sufficiently large $n$, $O(\\log{n}) \\ll O(\\sqrt{n})$, for $n \\le 10^6$, in practice, $O(\\log{n}) \\approx O(\\sqrt{n})$ because of the physical overhead of conditionally executing the recurrence-tree, lower bound of an $O(\\log{n})$ process.\n", 41 | "\n", 42 | "#### Optimization\n", 43 | "\n", 44 | "1. Parition an array of $n$ elements into blocks of size $\\sqrt{n}$ and maintain an auxiliary data structure that summarizes the elements inside each block.\n", 45 | "2. Execute an $O(\\sqrt{n})$ process by sequentially traversing the auxiliary data structure." 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | "## Doubly Linked Lists\n", 53 | "- Constant Splicing.\n", 54 | "- Dynamic Size.\n", 55 | "\n", 56 | "### Operations\n", 57 | "- `Insert(x,l)` ($O(1)$): Insert item `x` into doubly linked list `l`.\n", 58 | "- `Delete(x,l)` ($O(1)$): Remove item `x` from doubly linked list `l`.\n", 59 | "- `Search(x,l)` ($O(n)$): Return a node with item `x` if one exists in doubly linked list `l`.\n", 60 | "\n", 61 | "### See Also\n", 62 | "- [Collections](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html)\n", 63 | "- [LinkedList](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html)\n", 64 | "\n", 65 | "### Advice\n", 66 | "\n", 67 | "- List problems often have simple brute-force solutions that have $O(n)$ space complexity, but subtler solutions use the array itself to reduce space complexity to $O(1)$.\n", 68 | "- Consider using a sentinel to reduce edge cases such as checking empty lists.\n", 69 | "- Algorithms operating on lists often benefit from using two iterators, one ahead of the other, or one advancing quicker than the other.\n", 70 | "- A $k$-ary tree can be represented as a left-child right-sibling binary tree, a doubly chained tree." 71 | ] 72 | }, 73 | { 74 | "cell_type": "markdown", 75 | "metadata": {}, 76 | "source": [ 77 | "## Stacks (LIFO)\n", 78 | "\n", 79 | "### Use\n", 80 | "- Position-Based Retrieval.\n", 81 | "- Order Does Not Matter.\n", 82 | "- Nested (Recursive) Structure.\n", 83 | "\n", 84 | "### Operations\n", 85 | "- `Push(x,s)` ($O(1)$): Insert item `x` at the top of stack `s`.\n", 86 | "- `Pop(s)` ($O(1)$): Return and remove the top item of stack `s`.\n", 87 | "\n", 88 | "### See Also\n", 89 | "- [Stack](https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html)\n", 90 | "\n", 91 | "### Advice\n", 92 | "\n", 93 | "- Stacks are ideal for implementing non-trivial parsing.\n", 94 | "- A `Push` is ideal for transitioning from a parent context to a child context.\n", 95 | "- A `Pop` is ideal for transitioning from a child context to a parent context.\n", 96 | "- When performing a depth-first search using a stack, it never halts for infinite-depth. It finds any path to the goal, but it has polynomial space complexity.\n", 97 | "- To prevent infinite recursion using a stack, consider depth-limiting or iterative deepening the recursion." 98 | ] 99 | }, 100 | { 101 | "cell_type": "markdown", 102 | "metadata": {}, 103 | "source": [ 104 | "## Queues (FIFO)\n", 105 | "\n", 106 | "### Use\n", 107 | "- Position-Based Retrieval.\n", 108 | "- Order Does Matter.\n", 109 | "- Linear Structure.\n", 110 | "\n", 111 | "### Operations\n", 112 | "- `Enqueue(x,q)` ($O(1)$): Insert item `x` at the back of queue `q`.\n", 113 | "- `Dequeue(x,q)` ($O(1)$): Return and remove the front item from queue `q`.\n", 114 | "\n", 115 | "### See Also\n", 116 | "- [ArrayDeque](https://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html)\n", 117 | "\n", 118 | "### Advice\n", 119 | "\n", 120 | "- Queues are ideal for implementing non-trivial traversals.\n", 121 | "- `Enqueue` and `Dequeue` are ideal for circularly transitioning through sibling contexts. \n", 122 | "- When performing a breadth-first search using a queue, it always halts for infinite-depth. It finds the shortest path to the goal, but it has exponential space complexity." 123 | ] 124 | }, 125 | { 126 | "cell_type": "markdown", 127 | "metadata": {}, 128 | "source": [ 129 | "## Dictionaries\n", 130 | "\n", 131 | "### Use\n", 132 | "- Content-Based Retrieval.\n", 133 | "- *Hash-Based*: Unordered with $O(1)$.\n", 134 | " - Caching.\n", 135 | " - Lookup/Symbol Table.\n", 136 | "- *Tree-Based*: Ordered with $O(\\log(n))$.\n", 137 | " - Sorted Traversal.\n", 138 | " - Ceiling Query: Find an item with the least key greater than or equal to the given key.\n", 139 | " - Flooring Query: Find an item with the greatest key lesser than or equal to the given key.\n", 140 | " - Minimum Query: Find an item with the smallest key.\n", 141 | " - Maximum Query: Find an item with the largest key.\n", 142 | " - Higher Neighbour Query: Find an item with the least key strictly greater than the given key.\n", 143 | " - Lower Neighbour Query: Find an item with the greatest key strictly lower than the given key.\n", 144 | "\n", 145 | "### Operations\n", 146 | "- `Insert(x,d)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Insert item `x` into dictionary `d`.\n", 147 | "- `Delete(x,d)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Remove item `x` (or the item pointed to by `x`) from dictionary `d`.\n", 148 | "- `Search(x,d)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Return an item with key `k` if one exists in dictionary `d`.\n", 149 | "\n", 150 | "### See Also\n", 151 | "- [HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html)\n", 152 | "- [TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html)\n", 153 | "\n", 154 | "### Advice\n", 155 | "\n", 156 | "- A hash-based dictionary is ideal for partitioning using prefixes, suffixes, fingerprints, and signatures.\n", 157 | "- A tree-based dictionary is ideal for classifying using comparators as decision processes.\n", 158 | "- If you need a multi-map, consider your access patterns before having the values of your dictionary be contained in a list, a set, or a tree.\n", 159 | "- Some problems need a combination of a hash-based dictionary and a tree-based dictionary. Specifically, a hash-based dictionary can index into the entries of a tree-based dictionary.\n", 160 | "- Consider using a sentinel to reduce edge cases.\n", 161 | "- When representing ranges in a tree-based dictionary, consider having each entry be a partition, and have negative and positive infinities as sentinels." 162 | ] 163 | }, 164 | { 165 | "cell_type": "markdown", 166 | "metadata": {}, 167 | "source": [ 168 | "## Priority Queues\n", 169 | "\n", 170 | "### Use\n", 171 | "- Constant Minimum/Maximum Query.\n", 172 | "- $O(n \\log(n))$ In-Place Heap Sort.\n", 173 | "\n", 174 | "### Operations\n", 175 | "- `Insert(x,p)` ($O(\\log(n))$): Insert item `x` into priority queue `p`.\n", 176 | "- `Maximum(p)` ($O(1)$): Return the item with the largest key in priority queue `p`.\n", 177 | "- `ExtractMax(p)` ($O(\\log(n))$): Return and remove the item with the largest key in `p`.\n", 178 | "\n", 179 | "### See Also\n", 180 | "- [PriorityQueue](https://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html)\n", 181 | "\n", 182 | "### Advice\n", 183 | "\n", 184 | "- N/A." 185 | ] 186 | }, 187 | { 188 | "cell_type": "markdown", 189 | "metadata": {}, 190 | "source": [ 191 | "## Sets\n", 192 | "\n", 193 | "### Use\n", 194 | "- Filtering Duplicates.\n", 195 | "- Testing Membership.\n", 196 | "- *Hash-Based*: Unordered with $O(1)$.\n", 197 | "- *Tree-Based*: Ordered with $O(\\log(n))$.\n", 198 | "\n", 199 | "### Operations\n", 200 | "- `Insert(x,S)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Insert element `x` into set `S`.\n", 201 | "- `Delete(x,S)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Delete element `x` from set `S`.\n", 202 | "- `Member(x,S)` (*Hash-Based:* $O(1)$; *Tree-Based:* $O(\\log(n))$): Is an item `x` an element of set `S`?\n", 203 | "- `Union(A,B)`: Construct a subset of `A` and `B` of all elements in set `A` or in set `B`.\n", 204 | "- `Intersection(A,B)`: Construct a subset of `A` and `B` of all elements in set `A` and in set `B`.\n", 205 | "\n", 206 | "### See Also\n", 207 | "- [HashSet](https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html)\n", 208 | "- [TreeSet](https://docs.oracle.com/javase/8/docs/api/java/util/TreeSet.html)\n", 209 | "\n", 210 | "### Advice\n", 211 | "\n", 212 | "- N/A." 213 | ] 214 | }, 215 | { 216 | "cell_type": "markdown", 217 | "metadata": {}, 218 | "source": [ 219 | "## Hash Codes\n", 220 | "\n", 221 | "### Use\n", 222 | "- Filtering Duplicates.\n", 223 | "- Filtering Similarities (e.g. [*MinHash*](https://en.wikipedia.org/wiki/MinHash)).\n", 224 | "- Filtering [Nearest Neighbor Search](https://en.wikipedia.org/wiki/Nearest_neighbor_search) (e.g. [*Hamming Distance*](https://en.wikipedia.org/wiki/Hamming_distance), [*Cosine Distance*](https://en.wikipedia.org/wiki/Cosine_similarity), ...)\n", 225 | "- [Canonicalization/Normalization/Standardization](https://en.wikipedia.org/wiki/Canonicalization) (e.g., *Trimming*, *Stripping*, *Lowercase*, *Uppercase*, ...).\n", 226 | "- [Compaction](https://en.wikipedia.org/wiki/Data_compaction)/[Fingerprinting](https://en.wikipedia.org/wiki/Fingerprint_%28computing%29).\n", 227 | "- [Consistent Hashing](https://en.wikipedia.org/wiki/Consistent_hashing).\n", 228 | "- [Dimensionality Reduction](https://en.wikipedia.org/wiki/Dimensionality_reduction) (e.g. [*Hilbert Space-Filling Curve*](https://en.wikipedia.org/wiki/Hilbert_curve)).\n", 229 | "- [Partitioning](https://en.wikipedia.org/wiki/Partition_%28database%29).\n", 230 | "- Uniform Distribution Shuffling.\n", 231 | "\n", 232 | "### Operations\n", 233 | "- `Hash(x)` $O(1)$: Map arbitrary element `x` to a fixed-size value.\n", 234 | "\n", 235 | "### See Also\n", 236 | "- [Objects::hash(Object... values)](https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#hash-java.lang.Object...-)\n", 237 | "- [Objects::hashCode(Object o)](https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#hashCode-java.lang.Object-)\n", 238 | "- [Arrays::hashCode(Object[] a)](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#hashCode-java.lang.Object:A-)\n", 239 | "\n", 240 | "### Advice\n", 241 | "\n", 242 | "- N/A." 243 | ] 244 | } 245 | ], 246 | "metadata": { 247 | "kernelspec": { 248 | "display_name": "Java", 249 | "language": "java", 250 | "name": "java" 251 | }, 252 | "language_info": { 253 | "codemirror_mode": "text/x-java", 254 | "file_extension": ".java", 255 | "mimetype": "", 256 | "name": "Java", 257 | "nbconverter_exporter": "", 258 | "version": "1.8.0_152-release" 259 | }, 260 | "toc": { 261 | "base_numbering": 1, 262 | "nav_menu": {}, 263 | "number_sections": false, 264 | "sideBar": false, 265 | "skip_h1_title": false, 266 | "title_cell": "Table of Contents", 267 | "title_sidebar": "Contents", 268 | "toc_cell": false, 269 | "toc_position": {}, 270 | "toc_section_display": false, 271 | "toc_window_display": false 272 | } 273 | }, 274 | "nbformat": 4, 275 | "nbformat_minor": 2 276 | } 277 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/4. Combinations and Permutations.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Combinations and Permutations\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "## Generating Combinations ($O(2^n)$)" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "execution_count": 1, 21 | "metadata": {}, 22 | "outputs": [ 23 | { 24 | "data": { 25 | "text/plain": [ 26 | "recursive_algorithms.generating_combinations.GeneratingCombinations" 27 | ] 28 | }, 29 | "execution_count": 1, 30 | "metadata": {}, 31 | "output_type": "execute_result" 32 | } 33 | ], 34 | "source": [ 35 | "package recursive_algorithms.generating_combinations;\n", 36 | "\n", 37 | "import java.util.*;\n", 38 | "\n", 39 | "class GeneratingCombinations {\n", 40 | "\n", 41 | " public static void generateCombinations(\n", 42 | " List list, \n", 43 | " List> results, \n", 44 | " Deque buffer) {\n", 45 | " results.add(new ArrayList<>(buffer));\n", 46 | " \n", 47 | " for (int index = 0; index < list.size(); index++) {\n", 48 | " final List tailList = list.subList(index + 1, list.size());\n", 49 | " \n", 50 | " buffer.addLast(list.get(index));\n", 51 | " generateCombinations(tailList, results, buffer);\n", 52 | " buffer.removeLast();\n", 53 | " }\n", 54 | " }\n", 55 | " \n", 56 | "}" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 2, 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "name": "stdout", 66 | "output_type": "stream", 67 | "text": [ 68 | "[]\n", 69 | "[0]\n", 70 | "[0, 1]\n", 71 | "[0, 1, 2]\n", 72 | "[0, 2]\n", 73 | "[1]\n", 74 | "[1, 2]\n", 75 | "[2]\n" 76 | ] 77 | }, 78 | { 79 | "data": { 80 | "text/plain": [ 81 | "null" 82 | ] 83 | }, 84 | "execution_count": 2, 85 | "metadata": {}, 86 | "output_type": "execute_result" 87 | } 88 | ], 89 | "source": [ 90 | "package recursive_algorithms.generating_combinations;\n", 91 | "\n", 92 | "import java.util.*;\n", 93 | "\n", 94 | "final List list = new ArrayList(Arrays.asList(0, 1, 2));\n", 95 | "final List> results = new ArrayList<>();\n", 96 | "final Deque buffer = new ArrayDeque<>();\n", 97 | "\n", 98 | "GeneratingCombinations.generateCombinations(list, results, buffer);\n", 99 | "\n", 100 | "results.forEach(combination -> {\n", 101 | " System.out.println(combination.toString());\n", 102 | "});" 103 | ] 104 | }, 105 | { 106 | "cell_type": "markdown", 107 | "metadata": {}, 108 | "source": [ 109 | "## Generating Permutations ($O(n!)$)" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": 3, 115 | "metadata": {}, 116 | "outputs": [ 117 | { 118 | "data": { 119 | "text/plain": [ 120 | "recursive_algorithms.generating_permutations.GeneratingPermutations" 121 | ] 122 | }, 123 | "execution_count": 3, 124 | "metadata": {}, 125 | "output_type": "execute_result" 126 | } 127 | ], 128 | "source": [ 129 | "package recursive_algorithms.generating_permutations;\n", 130 | "\n", 131 | "import java.util.*;\n", 132 | "\n", 133 | "class GeneratingPermutations {\n", 134 | "\n", 135 | " public static void generatePermutations(\n", 136 | " List list, \n", 137 | " List> results, \n", 138 | " Deque buffer) {\n", 139 | " if (list.size() == 0) {\n", 140 | " results.add(new ArrayList<>(buffer));\n", 141 | " return;\n", 142 | " }\n", 143 | " \n", 144 | " for (int index = 0; index < list.size(); index++) {\n", 145 | " final List splicedList = new ArrayList<>(list);\n", 146 | " splicedList.remove(index);\n", 147 | " \n", 148 | " buffer.addLast(list.get(index));\n", 149 | " generatePermutations(splicedList, results, buffer);\n", 150 | " buffer.removeLast();\n", 151 | " }\n", 152 | " }\n", 153 | " \n", 154 | "}" 155 | ] 156 | }, 157 | { 158 | "cell_type": "code", 159 | "execution_count": 4, 160 | "metadata": {}, 161 | "outputs": [ 162 | { 163 | "name": "stdout", 164 | "output_type": "stream", 165 | "text": [ 166 | "[0, 1, 2]\n", 167 | "[0, 2, 1]\n", 168 | "[1, 0, 2]\n", 169 | "[1, 2, 0]\n", 170 | "[2, 0, 1]\n", 171 | "[2, 1, 0]\n" 172 | ] 173 | }, 174 | { 175 | "data": { 176 | "text/plain": [ 177 | "null" 178 | ] 179 | }, 180 | "execution_count": 4, 181 | "metadata": {}, 182 | "output_type": "execute_result" 183 | } 184 | ], 185 | "source": [ 186 | "package recursive_algorithms.generating_permutations;\n", 187 | "\n", 188 | "import java.util.*;\n", 189 | "\n", 190 | "final List list = new ArrayList(Arrays.asList(0, 1, 2));\n", 191 | "final List> results = new ArrayList<>();\n", 192 | "final Deque buffer = new ArrayDeque<>();\n", 193 | "\n", 194 | "GeneratingPermutations.generatePermutations(list, results, buffer);\n", 195 | "\n", 196 | "results.forEach(permutation -> {\n", 197 | " System.out.println(permutation.toString());\n", 198 | "});" 199 | ] 200 | }, 201 | { 202 | "cell_type": "markdown", 203 | "metadata": {}, 204 | "source": [ 205 | "## Generating k-Combinations" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 5, 211 | "metadata": {}, 212 | "outputs": [ 213 | { 214 | "data": { 215 | "text/plain": [ 216 | "recursive_algorithms.generating_combinations_k.GeneratingCombinationsK" 217 | ] 218 | }, 219 | "execution_count": 5, 220 | "metadata": {}, 221 | "output_type": "execute_result" 222 | } 223 | ], 224 | "source": [ 225 | "package recursive_algorithms.generating_combinations_k;\n", 226 | "\n", 227 | "import java.util.*;\n", 228 | "\n", 229 | "class GeneratingCombinationsK {\n", 230 | " \n", 231 | " public static void generateCombinationsK(\n", 232 | " List list, \n", 233 | " List> results, \n", 234 | " Deque buffer,\n", 235 | " int k) {\n", 236 | " if (buffer.size() == k) {\n", 237 | " results.add(new ArrayList<>(buffer));\n", 238 | " return;\n", 239 | " }\n", 240 | " \n", 241 | " for (int index = 0; index < list.size(); index++) {\n", 242 | " final List tailList = list.subList(index + 1, list.size());\n", 243 | " \n", 244 | " buffer.addLast(list.get(index));\n", 245 | " generateCombinationsK(tailList, results, buffer, k);\n", 246 | " buffer.removeLast();\n", 247 | " }\n", 248 | " }\n", 249 | " \n", 250 | "}" 251 | ] 252 | }, 253 | { 254 | "cell_type": "code", 255 | "execution_count": 6, 256 | "metadata": {}, 257 | "outputs": [ 258 | { 259 | "name": "stdout", 260 | "output_type": "stream", 261 | "text": [ 262 | "[0, 1]\n", 263 | "[0, 2]\n", 264 | "[1, 2]\n" 265 | ] 266 | }, 267 | { 268 | "data": { 269 | "text/plain": [ 270 | "null" 271 | ] 272 | }, 273 | "execution_count": 6, 274 | "metadata": {}, 275 | "output_type": "execute_result" 276 | } 277 | ], 278 | "source": [ 279 | "package recursive_algorithms.generating_combinations_k;\n", 280 | "\n", 281 | "import java.util.*;\n", 282 | "\n", 283 | "final List list = new ArrayList(Arrays.asList(0, 1, 2));\n", 284 | "final List> results = new ArrayList<>();\n", 285 | "final Deque buffer = new ArrayDeque<>();\n", 286 | "\n", 287 | "GeneratingCombinationsK.generateCombinationsK(list, results, buffer, 2);\n", 288 | "\n", 289 | "results.forEach(combination -> {\n", 290 | " System.out.println(combination.toString());\n", 291 | "});" 292 | ] 293 | }, 294 | { 295 | "cell_type": "markdown", 296 | "metadata": {}, 297 | "source": [ 298 | "## Generating k-Permutations" 299 | ] 300 | }, 301 | { 302 | "cell_type": "code", 303 | "execution_count": 7, 304 | "metadata": {}, 305 | "outputs": [ 306 | { 307 | "data": { 308 | "text/plain": [ 309 | "recursive_algorithms.generating_permutations_k.GeneratingPermutationsK" 310 | ] 311 | }, 312 | "execution_count": 7, 313 | "metadata": {}, 314 | "output_type": "execute_result" 315 | } 316 | ], 317 | "source": [ 318 | "package recursive_algorithms.generating_permutations_k;\n", 319 | "\n", 320 | "import java.util.*;\n", 321 | "\n", 322 | "class GeneratingPermutationsK {\n", 323 | " \n", 324 | " public static void generatePermutationsK(\n", 325 | " List list, \n", 326 | " List> results, \n", 327 | " Deque buffer,\n", 328 | " int k) {\n", 329 | " if (buffer.size() == k) {\n", 330 | " results.add(new ArrayList<>(buffer));\n", 331 | " return;\n", 332 | " }\n", 333 | " \n", 334 | " for (int index = 0; index < list.size(); index++) {\n", 335 | " final List splicedList = new ArrayList<>(list);\n", 336 | " splicedList.remove(index);\n", 337 | "\n", 338 | " buffer.addLast(list.get(index));\n", 339 | " generatePermutationsK(splicedList, results, buffer, k);\n", 340 | " buffer.removeLast();\n", 341 | " }\n", 342 | " }\n", 343 | " \n", 344 | "}" 345 | ] 346 | }, 347 | { 348 | "cell_type": "code", 349 | "execution_count": 8, 350 | "metadata": {}, 351 | "outputs": [ 352 | { 353 | "name": "stdout", 354 | "output_type": "stream", 355 | "text": [ 356 | "[0, 1]\n", 357 | "[0, 2]\n", 358 | "[1, 0]\n", 359 | "[1, 2]\n", 360 | "[2, 0]\n", 361 | "[2, 1]\n" 362 | ] 363 | }, 364 | { 365 | "data": { 366 | "text/plain": [ 367 | "null" 368 | ] 369 | }, 370 | "execution_count": 8, 371 | "metadata": {}, 372 | "output_type": "execute_result" 373 | } 374 | ], 375 | "source": [ 376 | "package recursive_algorithms.generating_permutations_k;\n", 377 | "\n", 378 | "import java.util.*;\n", 379 | "\n", 380 | "final List list = new ArrayList<>(Arrays.asList(0, 1, 2));\n", 381 | "final List> results = new ArrayList<>();\n", 382 | "final Deque buffer = new ArrayDeque<>();\n", 383 | "\n", 384 | "GeneratingPermutationsK.generatePermutationsK(list, results, buffer, 2);\n", 385 | "\n", 386 | "results.forEach(permutation -> {\n", 387 | " System.out.println(permutation.toString());\n", 388 | "});" 389 | ] 390 | }, 391 | { 392 | "cell_type": "markdown", 393 | "metadata": {}, 394 | "source": [ 395 | "## Generating Unique Combinations" 396 | ] 397 | }, 398 | { 399 | "cell_type": "code", 400 | "execution_count": 9, 401 | "metadata": {}, 402 | "outputs": [ 403 | { 404 | "data": { 405 | "text/plain": [ 406 | "recursive_algorithms.generating_unique_combinations.GeneratingUniqueCombinations" 407 | ] 408 | }, 409 | "execution_count": 9, 410 | "metadata": {}, 411 | "output_type": "execute_result" 412 | } 413 | ], 414 | "source": [ 415 | "package recursive_algorithms.generating_unique_combinations;\n", 416 | "\n", 417 | "import java.util.*;\n", 418 | "\n", 419 | "public class GeneratingUniqueCombinations {\n", 420 | "\n", 421 | " public static List> generateUniqueCombinations(List list) {\n", 422 | " final List> results = new LinkedList<>();\n", 423 | " final Deque buffer = new ArrayDeque<>();\n", 424 | "\n", 425 | " Collections.sort(list);\n", 426 | "\n", 427 | " generateUniqueCombinations(list, results, buffer);\n", 428 | "\n", 429 | " return results;\n", 430 | " }\n", 431 | "\n", 432 | " private static void generateUniqueCombinations(\n", 433 | " List list,\n", 434 | " List> results,\n", 435 | " Deque buffer) {\n", 436 | " results.add(new ArrayList<>(buffer));\n", 437 | "\n", 438 | " for (int index = 0; index < list.size(); index++) {\n", 439 | " if (index > 0 && list.get(index) == list.get(index - 1)) {\n", 440 | " continue;\n", 441 | " }\n", 442 | "\n", 443 | " final List tailList = list.subList(index + 1, list.size());\n", 444 | "\n", 445 | " buffer.addLast(list.get(index));\n", 446 | " generateUniqueCombinations(tailList, results, buffer);\n", 447 | " buffer.removeLast();\n", 448 | " }\n", 449 | " }\n", 450 | " \n", 451 | "}" 452 | ] 453 | }, 454 | { 455 | "cell_type": "code", 456 | "execution_count": 10, 457 | "metadata": {}, 458 | "outputs": [ 459 | { 460 | "name": "stdout", 461 | "output_type": "stream", 462 | "text": [ 463 | "[]\n", 464 | "[0]\n", 465 | "[0, 0]\n", 466 | "[0, 0, 1]\n", 467 | "[0, 0, 1, 2]\n", 468 | "[0, 0, 2]\n", 469 | "[0, 1]\n", 470 | "[0, 1, 2]\n", 471 | "[0, 2]\n", 472 | "[1]\n", 473 | "[1, 2]\n", 474 | "[2]\n" 475 | ] 476 | }, 477 | { 478 | "data": { 479 | "text/plain": [ 480 | "null" 481 | ] 482 | }, 483 | "execution_count": 10, 484 | "metadata": {}, 485 | "output_type": "execute_result" 486 | } 487 | ], 488 | "source": [ 489 | "package recursive_algorithms.generating_unique_combinations;\n", 490 | "\n", 491 | "import java.util.*;\n", 492 | "\n", 493 | "final List list = new ArrayList(Arrays.asList(0, 0, 1, 2));\n", 494 | "\n", 495 | "final List> results =\n", 496 | " GeneratingUniqueCombinations.generateUniqueCombinations(list);\n", 497 | "\n", 498 | "results.forEach(combination -> {\n", 499 | " System.out.println(combination.toString());\n", 500 | "});" 501 | ] 502 | }, 503 | { 504 | "cell_type": "markdown", 505 | "metadata": {}, 506 | "source": [ 507 | "## Generating Unique Permutations" 508 | ] 509 | }, 510 | { 511 | "cell_type": "code", 512 | "execution_count": 11, 513 | "metadata": {}, 514 | "outputs": [ 515 | { 516 | "data": { 517 | "text/plain": [ 518 | "recursive_algorithms.generating_unique_permutations.GeneratingUniquePermutations" 519 | ] 520 | }, 521 | "execution_count": 11, 522 | "metadata": {}, 523 | "output_type": "execute_result" 524 | } 525 | ], 526 | "source": [ 527 | "package recursive_algorithms.generating_unique_permutations;\n", 528 | "\n", 529 | "import java.util.*;\n", 530 | "\n", 531 | "public class GeneratingUniquePermutations {\n", 532 | "\n", 533 | " public static List> generateUniquePermutations(List list) {\n", 534 | " final List> results = new LinkedList<>();\n", 535 | " final Deque buffer = new ArrayDeque<>();\n", 536 | "\n", 537 | " Collections.sort(list);\n", 538 | "\n", 539 | " generateUniquePermutations(list, results, buffer);\n", 540 | "\n", 541 | " return results;\n", 542 | " }\n", 543 | "\n", 544 | " private static void generateUniquePermutations(\n", 545 | " List list,\n", 546 | " List> results,\n", 547 | " Deque buffer) {\n", 548 | " if (list.size() == 0) {\n", 549 | " results.add(new ArrayList<>(buffer));\n", 550 | " return;\n", 551 | " }\n", 552 | "\n", 553 | " for (int index = 0; index < list.size(); index++) {\n", 554 | " if (index > 0 && list.get(index) == list.get(index - 1)) {\n", 555 | " continue;\n", 556 | " }\n", 557 | "\n", 558 | " final List splicedList = new ArrayList<>(list);\n", 559 | " splicedList.remove(index);\n", 560 | "\n", 561 | " buffer.addLast(list.get(index));\n", 562 | " generateUniquePermutations(splicedList, results, buffer);\n", 563 | " buffer.removeLast();\n", 564 | " }\n", 565 | " }\n", 566 | "\n", 567 | "}" 568 | ] 569 | }, 570 | { 571 | "cell_type": "code", 572 | "execution_count": 12, 573 | "metadata": {}, 574 | "outputs": [ 575 | { 576 | "name": "stdout", 577 | "output_type": "stream", 578 | "text": [ 579 | "[0, 0, 1, 2]\n", 580 | "[0, 0, 2, 1]\n", 581 | "[0, 1, 0, 2]\n", 582 | "[0, 1, 2, 0]\n", 583 | "[0, 2, 0, 1]\n", 584 | "[0, 2, 1, 0]\n", 585 | "[1, 0, 0, 2]\n", 586 | "[1, 0, 2, 0]\n", 587 | "[1, 2, 0, 0]\n", 588 | "[2, 0, 0, 1]\n", 589 | "[2, 0, 1, 0]\n", 590 | "[2, 1, 0, 0]\n" 591 | ] 592 | }, 593 | { 594 | "data": { 595 | "text/plain": [ 596 | "null" 597 | ] 598 | }, 599 | "execution_count": 12, 600 | "metadata": {}, 601 | "output_type": "execute_result" 602 | } 603 | ], 604 | "source": [ 605 | "package recursive_algorithms.generating_unique_permutations;\n", 606 | "\n", 607 | "import java.util.*;\n", 608 | "\n", 609 | "final List list = new ArrayList(Arrays.asList(0, 0, 1, 2));\n", 610 | "\n", 611 | "final List> results =\n", 612 | " GeneratingUniquePermutations.generateUniquePermutations(list);\n", 613 | "\n", 614 | "results.forEach(permutation -> {\n", 615 | " System.out.println(permutation.toString());\n", 616 | "});" 617 | ] 618 | } 619 | ], 620 | "metadata": { 621 | "kernelspec": { 622 | "display_name": "Java", 623 | "language": "java", 624 | "name": "java" 625 | }, 626 | "language_info": { 627 | "codemirror_mode": "text/x-java", 628 | "file_extension": ".java", 629 | "mimetype": "", 630 | "name": "Java", 631 | "nbconverter_exporter": "", 632 | "version": "1.8.0_152-release" 633 | }, 634 | "toc": { 635 | "base_numbering": 1, 636 | "nav_menu": {}, 637 | "number_sections": false, 638 | "sideBar": false, 639 | "skip_h1_title": false, 640 | "title_cell": "Table of Contents", 641 | "title_sidebar": "Contents", 642 | "toc_cell": false, 643 | "toc_position": {}, 644 | "toc_section_display": false, 645 | "toc_window_display": false 646 | } 647 | }, 648 | "nbformat": 4, 649 | "nbformat_minor": 2 650 | } 651 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/5. Backtracking.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Backtracking\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "A backtracking algorithm is an algorithm that enumerates a set of *partial candidates* that could be completed through various extensions to give all the possible solutions to the given problem. The completion is done incrementally, by a sequence of *candidate extension steps*." 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "## Pseudocode" 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "execution_count": 1, 28 | "metadata": {}, 29 | "outputs": [ 30 | { 31 | "data": { 32 | "text/plain": [ 33 | "backtracking.pseudocode.Backtracking" 34 | ] 35 | }, 36 | "execution_count": 1, 37 | "metadata": {}, 38 | "output_type": "execute_result" 39 | } 40 | ], 41 | "source": [ 42 | "package backtracking.pseudocode;\n", 43 | "\n", 44 | "import java.util.*;\n", 45 | "\n", 46 | "class Backtracking {\n", 47 | " \n", 48 | " public static class Problem {\n", 49 | " \n", 50 | " public Problem() {\n", 51 | " throw new UnsupportedOperationException();\n", 52 | " }\n", 53 | " \n", 54 | " }\n", 55 | " \n", 56 | " public static class Candidate {\n", 57 | " \n", 58 | " public Candidate() {\n", 59 | " throw new UnsupportedOperationException();\n", 60 | " }\n", 61 | " \n", 62 | " }\n", 63 | " \n", 64 | " public static void backtrack(Problem p) {\n", 65 | " backtrack(p, initialCandidate(p));\n", 66 | " }\n", 67 | " \n", 68 | " private static void backtrack(Problem p, Candidate c) {\n", 69 | " if (rejectCandidate(p, c)) {\n", 70 | " return;\n", 71 | " }\n", 72 | " if (acceptCandidate(p, c)) {\n", 73 | " outputSolution(p, c);\n", 74 | " return;\n", 75 | " }\n", 76 | " \n", 77 | " final Iterable extensions = extendCandidate(p, c);\n", 78 | " \n", 79 | " for (Candidate e : extensions) {\n", 80 | " backtrack(p, e);\n", 81 | " }\n", 82 | " }\n", 83 | " \n", 84 | " private static Candidate initialCandidate(Problem p) {\n", 85 | " throw new UnsupportedOperationException();\n", 86 | " }\n", 87 | " \n", 88 | " private static boolean rejectCandidate(Problem p, Candidate c) {\n", 89 | " throw new UnsupportedOperationException();\n", 90 | " }\n", 91 | " \n", 92 | " private static boolean acceptCandidate(Problem p, Candidate c) {\n", 93 | " throw new UnsupportedOperationException();\n", 94 | " }\n", 95 | " \n", 96 | " private static void outputSolution(Problem p, Candidate c) {\n", 97 | " throw new UnsupportedOperationException();\n", 98 | " }\n", 99 | " \n", 100 | " private static Iterable extendCandidate(Problem p, Candidate c) {\n", 101 | " return new Iterable() {\n", 102 | " @Override\n", 103 | " public Iterator iterator() {\n", 104 | " return new Iterator() {\n", 105 | " @Override\n", 106 | " public boolean hasNext() {\n", 107 | " throw new UnsupportedOperationException();\n", 108 | " }\n", 109 | "\n", 110 | " @Override\n", 111 | " public Candidate next() {\n", 112 | " throw new UnsupportedOperationException();\n", 113 | " }\n", 114 | " };\n", 115 | " } \n", 116 | " };\n", 117 | " }\n", 118 | " \n", 119 | "}" 120 | ] 121 | }, 122 | { 123 | "cell_type": "markdown", 124 | "metadata": {}, 125 | "source": [ 126 | "## Backtracking Example: Eight Queens Puzzle\n", 127 | "[See Link](https://en.wikipedia.org/wiki/Eight_queens_puzzle)." 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": 2, 133 | "metadata": {}, 134 | "outputs": [ 135 | { 136 | "data": { 137 | "text/plain": [ 138 | "backtracking.example.eight_queens_puzzle.EightQueensPuzzle" 139 | ] 140 | }, 141 | "execution_count": 2, 142 | "metadata": {}, 143 | "output_type": "execute_result" 144 | } 145 | ], 146 | "source": [ 147 | "package backtracking.example.eight_queens_puzzle;\n", 148 | "\n", 149 | "import java.lang.Math;\n", 150 | "import java.util.*;\n", 151 | "\n", 152 | "class EightQueensPuzzle {\n", 153 | " \n", 154 | " private static class Position {\n", 155 | "\n", 156 | " private final int row;\n", 157 | " private final int column;\n", 158 | "\n", 159 | " public Position(int row, int column) {\n", 160 | " this.row = row;\n", 161 | " this.column = column;\n", 162 | " }\n", 163 | "\n", 164 | " public int getRow() {\n", 165 | " return row;\n", 166 | " }\n", 167 | "\n", 168 | " public int getColumn() {\n", 169 | " return column;\n", 170 | " }\n", 171 | "\n", 172 | " }\n", 173 | "\n", 174 | " public static int countSolutions(int n) {\n", 175 | " return countSolutions(n, initialCandidate(n));\n", 176 | " }\n", 177 | "\n", 178 | " private static int countSolutions(int n, ArrayList candidate) {\n", 179 | " if (rejectCandidate(n, candidate)) {\n", 180 | " return 0;\n", 181 | " }\n", 182 | " if (acceptCandidate(n, candidate)) {\n", 183 | " return 1;\n", 184 | " }\n", 185 | "\n", 186 | " int currentCount = 0;\n", 187 | "\n", 188 | " final int row = candidate.size() + 1;\n", 189 | " for (int column = 1; column <= n; column++) {\n", 190 | " final ArrayList extension = new ArrayList<>(candidate);\n", 191 | "\n", 192 | " extension.add(new Position(row, column));\n", 193 | "\n", 194 | " currentCount += countSolutions(n, extension);\n", 195 | " }\n", 196 | "\n", 197 | " return currentCount;\n", 198 | " }\n", 199 | "\n", 200 | " private static ArrayList initialCandidate(int n) {\n", 201 | " return new ArrayList<>(n);\n", 202 | " }\n", 203 | "\n", 204 | " private static boolean rejectCandidate(int n, ArrayList candidate) {\n", 205 | " if (candidate.size() > n) {\n", 206 | " return true;\n", 207 | " }\n", 208 | "\n", 209 | " for (int index = 0; index < candidate.size() - 1; index++) {\n", 210 | " final Position lastPosition = candidate.get(candidate.size() - 1);\n", 211 | " final Position currentPosition = candidate.get(index);\n", 212 | "\n", 213 | " if (currentPosition.getRow() == lastPosition.getRow()) {\n", 214 | " return true;\n", 215 | " }\n", 216 | " if (currentPosition.getColumn() == lastPosition.getColumn()) {\n", 217 | " return true;\n", 218 | " }\n", 219 | " if (Math.abs(currentPosition.getColumn() - lastPosition.getColumn()) ==\n", 220 | " Math.abs(currentPosition.getRow() - lastPosition.getRow())) {\n", 221 | " return true;\n", 222 | " }\n", 223 | " }\n", 224 | "\n", 225 | " return false;\n", 226 | " }\n", 227 | "\n", 228 | " private static boolean acceptCandidate(int n, ArrayList candidate) {\n", 229 | " return n == candidate.size();\n", 230 | " }\n", 231 | " \n", 232 | "}" 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": 3, 238 | "metadata": {}, 239 | "outputs": [ 240 | { 241 | "name": "stdout", 242 | "output_type": "stream", 243 | "text": [ 244 | "Number of Solutions for Eight Queens: 92\n" 245 | ] 246 | }, 247 | { 248 | "data": { 249 | "text/plain": [ 250 | "null" 251 | ] 252 | }, 253 | "execution_count": 3, 254 | "metadata": {}, 255 | "output_type": "execute_result" 256 | } 257 | ], 258 | "source": [ 259 | "package backtracking.example.eight_queens_puzzle;\n", 260 | "\n", 261 | "System.out.println(String.format(\n", 262 | " \"Number of Solutions for Eight Queens: %d\", EightQueensPuzzle.countSolutions(8)));" 263 | ] 264 | } 265 | ], 266 | "metadata": { 267 | "kernelspec": { 268 | "display_name": "Java", 269 | "language": "java", 270 | "name": "java" 271 | }, 272 | "language_info": { 273 | "codemirror_mode": "text/x-java", 274 | "file_extension": ".java", 275 | "mimetype": "", 276 | "name": "Java", 277 | "nbconverter_exporter": "", 278 | "version": "1.8.0_152-release" 279 | }, 280 | "toc": { 281 | "base_numbering": 1, 282 | "nav_menu": {}, 283 | "number_sections": false, 284 | "sideBar": false, 285 | "skip_h1_title": false, 286 | "title_cell": "Table of Contents", 287 | "title_sidebar": "Contents", 288 | "toc_cell": false, 289 | "toc_position": {}, 290 | "toc_section_display": false, 291 | "toc_window_display": false 292 | } 293 | }, 294 | "nbformat": 4, 295 | "nbformat_minor": 2 296 | } 297 | -------------------------------------------------------------------------------- /Databases/Architecture of a Database System/images/AOADS_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/Architecture of a Database System/images/AOADS_1.png -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Explaining the Postgres Query Optimizer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Explaining the Postgres Query Optimizer.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Hacking PostgreSQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Hacking PostgreSQL.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Inside PostgreSQL Shared Memory.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Inside PostgreSQL Shared Memory.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Intro to Postgres Planner Hacking.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Intro to Postgres Planner Hacking.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Introduction to Hacking PostgreSQL - Handout.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Introduction to Hacking PostgreSQL - Handout.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Introduction to Hacking PostgreSQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Introduction to Hacking PostgreSQL.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Introduction to Memory Contexts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Introduction to Memory Contexts.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/MVCC Unmasked.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/MVCC Unmasked.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Parallelism in PostgreSQL 11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Parallelism in PostgreSQL 11.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/PostgreSQL Internals Through Pictures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/PostgreSQL Internals Through Pictures.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/PostgreSQL Performance Tuning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/PostgreSQL Performance Tuning.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Query Execution Techniques in PostgreSQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Query Execution Techniques in PostgreSQL.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Unlocking the Postgres Lock Manager.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Unlocking the Postgres Lock Manager.pdf -------------------------------------------------------------------------------- /Databases/PostgreSQL/pdfs/Will Postgres Live Forever.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Databases/PostgreSQL/pdfs/Will Postgres Live Forever.pdf -------------------------------------------------------------------------------- /LeetCode/README.md: -------------------------------------------------------------------------------- 1 | # Learning LeetCode 2 | 3 | > **Reminder**: Breadth + Associations + Spaced Repetition ⇒ Reading 5 LeetCode Solutions in 1 Hour ≫ Writing 1 LeetCode Solution in 30 Minutes. 4 | 5 | 1. Watch [**The Black Box Method**](https://youtu.be/RDzsrmMl48I?si=QxAUl7csv9086aWp). 6 | 2. *Black Box* Data Structures and Algorithms. 7 | - *Goal*: Given a sufficient *Standard Library* like the *Java Standard Library*, memorize how to utilize its data structures and algorithms to implement other data structures and algorithms that you will need to solve problems. 8 | - [1. Java Standard Library](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/1.%20Java%20Standard%20Library.ipynb). 9 | - [2. Data Structures](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/2.%20Data%20Structures.ipynb). 10 | - [3. Sorting and Searching](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/3.%20Sorting%20and%20Searching.ipynb). 11 | - [4. Combinations and Permutations](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/4.%20Combinations%20and%20Permutations.ipynb). 12 | - [5. Backtracking](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/5.%20Backtracking.ipynb). 13 | - [6. Dynamic Programming](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/6.%20Dynamic%20Programming.ipynb). 14 | - [7. Graphs](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/7.%20Graphs.ipynb). 15 | - [8. Trees](https://github.com/jparkie/Programming-Notebook/blob/master/Data%20Structures%20and%20Algorithms/8.%20Trees.ipynb). 16 | - *Notebooks 1-5* are techniques for *Brute-Force*. 17 | - *Notebooks 6-8* are techniques for *Optimization*. 18 | 3. Implement with *Muscle Memory*: *~5-50 Lines Each*. 19 | - Insertion Sort's `swap()`. 20 | - Merge Sort's `merge()`. 21 | - Quick Sort's `partition()`. 22 | - Counting Sort's `count()`. 23 | - Binary Search. 24 | - Combinations, k-Combinations, Unique Combinations. 25 | - Permutations, k-Permutations, Unique Permutations. 26 | - Backtracking Template: *Reject*, *Accept*, *Extend*, *Backtrack*. 27 | - Depth-First Search. 28 | - Breadth-First Search. 29 | - Pre-Order Tree Traversal. 30 | - In-Order Tree Traversal. 31 | - Post-Order Tree Traversal. 32 | - Binary Search of a Binary Search Tree. 33 | - Minimum of a Binary Search Tree. 34 | - Maximum of a Binary Search Tree. 35 | - Successor of a Binary Search Tree. 36 | - Predecessor of a Binary Search Tree. 37 | - Disjoint Set/Union-Find (Connectivity Queries). 38 | - Trie (String Queries). 39 | - Fenwick Tree (Cumulative Queries). 40 | - Segment Tree (Range Queries). 41 | 4. Follow NeetCode's *NeetCode 150* Roadmap for LeetCode: https://neetcode.io/roadmap 42 | - [YouTube Overview](https://youtu.be/jgQjes7MgTM?si=xKztngwvMRiJM7AG). 43 | - [Jacob's LeetCode Patterns' Tips and Tricks](https://github.com/jparkie/Programming-Notebook/blob/master/LeetCode/LeetCode%20Patterns.ipynb). 44 | 1. Read the *Problem*. 45 | 2. State the *Worst-Case Time/Space Complexity* for the *Brute-Force Solution*. 46 | - e.g., Iterating a *1-D Array* ⇒ *Linear Complexity*. 47 | - e.g., Iterating a *2-D Array* ⇒ *Quadratic Complexity*. 48 | - e.g., Iterating a *Range* ⇒ *Quadratic Complexity*. 49 | - e.g., Iterating a *Combination* ⇒ *Exponential Complexity*. 50 | - e.g., Iterating a *Permutations* ⇒ *Factorial Complexity*. 51 | - e.g., Iterating an *Integer Constraint* ⇒ *Linear Complexity*. 52 | - For example, the counting of all substrings in `S` that have `k` unique characters can be brute-forced by the product of *Iterating a Range* and *Iterating an Integer Constraint*: $O\left(\left|S\right|^2 \cdot k\right)$. The complexity implies that the brute-forced code requires 3 nested-loops with `startIndex`, `endIndex`, and `k`. 53 | - **Key Idea**: Parameterizing the *Problem* implies *Worst-Case Time/Space Complexities* that imply a structure or a template for the code. 54 | 3. If you are able to state the *Optimal Solution* as 1 to 3 English sentences, referencing *LeetCode Patterns*, *LeetCode Tips and Tricks*, and/or *Data Structures and Algorithms*, then proceed to implement the code (~5 Minutes for *Easy*, ~15 Minutes for *Medium*). 55 | - e.g., [**3Sum**](https://leetcode.com/problems/3sum/) is solved by *Unique Combinations* and *Two Pointers* templated with a *Forward Index*, a *Backward Index*, and a *Meet-in-the-Middle Termination Condition*. 56 | - **Key Idea**: Phrasing the *Solution* implies a structure or a template for the code given the code associated with the various *LeetCode Patterns*, *LeetCode Tips and Tricks*, and/or *Data Structures and Algorithms*. 57 | 4. If you are unable to state the *Optimal Solution*, then **IMMEDIATELY** study the code of the *Optimal Solution* available at https://walkccc.me/LeetCode/. 58 | - [walkccc/LeetCode](https://walkccc.me/LeetCode/) has 90% of the nearly 3000 LeetCode problems solved in C++, Java, and Python. 59 | - Understand how the stated *Time Complexity*, *Space Complexity*, and *LeetCode Patterns* are represented through the code. 60 | - **Key Idea**: The [Structured Programming Theorem](https://en.wikipedia.org/wiki/Structured_program_theorem) states that any algorithm can be implemented if you can perform memory operations, conditionals, and loops. Thus, emphasize what kind of conditonals and loops are common with the *LeetCode Patterns* represented through the code. Nonetheless, the conditionals are normally specific to the solution while the loops are general to the pattern. 61 | 5. If you are unable to understand the *Time Complexity*, *Space Complexity*, and *LeetCode Patterns* represented through the *Optimal Solution*, then watch a video explanation at https://www.youtube.com/@NeetCode. 62 | 6. Practice [Spaced Repetition](https://en.wikipedia.org/wiki/Spaced_repetition) with *Steps 3-5* to reinforce the associations between a *Problem*, *LeetCode Patterns*, and reusable code snippets. 63 | - Previously, if you learned [**3Sum**](https://leetcode.com/problems/3sum/), then state the *Optimal Solution* in 1-3 English sentences, and then attempt to implement its code within 10-15 minutes, then 5-10 minutes, and etc.... 64 | - **Key Idea**: https://youtu.be/VHZDxOmRthE?si=XzreKzzOePMPpebm 65 | -------------------------------------------------------------------------------- /Papers/A Brief Review of Nature-Inspired Algorithms for Optimization.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/A Brief Review of Nature-Inspired Algorithms for Optimization.pdf -------------------------------------------------------------------------------- /Papers/A Survey of Distributed File Systems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/A Survey of Distributed File Systems.pdf -------------------------------------------------------------------------------- /Papers/A Survey of Join Processing in Data Streams.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/A Survey of Join Processing in Data Streams.pdf -------------------------------------------------------------------------------- /Papers/A Survey on Learning to Hash.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/A Survey on Learning to Hash.pdf -------------------------------------------------------------------------------- /Papers/A shortest augmenting path algorithm for dense and sparse linear assignment problems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/A shortest augmenting path algorithm for dense and sparse linear assignment problems.pdf -------------------------------------------------------------------------------- /Papers/Adaptive Cuckoo Filters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Adaptive Cuckoo Filters.pdf -------------------------------------------------------------------------------- /Papers/Advanced Bloom Filter Based Algorithms for Efficient Approximate Data De-Duplication in Streams.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Advanced Bloom Filter Based Algorithms for Efficient Approximate Data De-Duplication in Streams.pdf -------------------------------------------------------------------------------- /Papers/An Experimental Study of Compression Methods for Dynamic Tries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/An Experimental Study of Compression Methods for Dynamic Tries.pdf -------------------------------------------------------------------------------- /Papers/Approximate Membership of Sets - A Survey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Approximate Membership of Sets - A Survey.pdf -------------------------------------------------------------------------------- /Papers/Approximate Range Emptiness in Constant Time and Optimal Space.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Approximate Range Emptiness in Constant Time and Optimal Space.pdf -------------------------------------------------------------------------------- /Papers/Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters.pdf -------------------------------------------------------------------------------- /Papers/Architecture of a Database System.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Architecture of a Database System.pdf -------------------------------------------------------------------------------- /Papers/Asymptotically Optimal Filters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Asymptotically Optimal Filters.pdf -------------------------------------------------------------------------------- /Papers/Average-Case Analysis of Approximate Trie Search.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Average-Case Analysis of Approximate Trie Search.pdf -------------------------------------------------------------------------------- /Papers/Bizur - A Key-value Consensus Algorithm for Scalable File-systems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Bizur - A Key-value Consensus Algorithm for Scalable File-systems.pdf -------------------------------------------------------------------------------- /Papers/BloomUnit - Declarative Testing for Distributed Programs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/BloomUnit - Declarative Testing for Distributed Programs.pdf -------------------------------------------------------------------------------- /Papers/C99 Standard.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/C99 Standard.pdf -------------------------------------------------------------------------------- /Papers/CRDTs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/CRDTs.pdf -------------------------------------------------------------------------------- /Papers/Cache-aware load balancing of data center applications.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Cache-aware load balancing of data center applications.pdf -------------------------------------------------------------------------------- /Papers/Cassandra.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Cassandra.pdf -------------------------------------------------------------------------------- /Papers/Chucky - A Succinct Cuckoo Filter for LSM-Tree.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Chucky - A Succinct Cuckoo Filter for LSM-Tree.pdf -------------------------------------------------------------------------------- /Papers/Compilation Methods of Minimal Acyclic Finite-State Automata for Large Dictionaries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Compilation Methods of Minimal Acyclic Finite-State Automata for Large Dictionaries.pdf -------------------------------------------------------------------------------- /Papers/Consistency Analysis in Bloom - a CALM and Collected Approach.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Consistency Analysis in Bloom - a CALM and Collected Approach.pdf -------------------------------------------------------------------------------- /Papers/Constant Time Recovery in Azure SQL Database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Constant Time Recovery in Azure SQL Database.pdf -------------------------------------------------------------------------------- /Papers/Coordination Avoidance in Database Systems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Coordination Avoidance in Database Systems.pdf -------------------------------------------------------------------------------- /Papers/Discretized Streams - Fault-Tolerant Streaming Computation at Scale.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Discretized Streams - Fault-Tolerant Streaming Computation at Scale.pdf -------------------------------------------------------------------------------- /Papers/Dostoevsky - Better Space-Time Trade-Offs for LSM-Tree Based Key-Value Stores via Adaptive Removal of Superfluous Merging.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Dostoevsky - Better Space-Time Trade-Offs for LSM-Tree Based Key-Value Stores via Adaptive Removal of Superfluous Merging.pdf -------------------------------------------------------------------------------- /Papers/Dynamical sources in information theory - A general analysis of trie structures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Dynamical sources in information theory - A general analysis of trie structures.pdf -------------------------------------------------------------------------------- /Papers/Dynamo - Amazon’s Highly Available Key-value Store.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Dynamo - Amazon’s Highly Available Key-value Store.pdf -------------------------------------------------------------------------------- /Papers/Fully-Online Suffix Tree and Directed Acyclic Word Graph Construction for Multiple Texts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Fully-Online Suffix Tree and Directed Acyclic Word Graph Construction for Multiple Texts.pdf -------------------------------------------------------------------------------- /Papers/HDFS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/HDFS.pdf -------------------------------------------------------------------------------- /Papers/Hand-book on statistical distributions for experimentalists.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Hand-book on statistical distributions for experimentalists.pdf -------------------------------------------------------------------------------- /Papers/Hashing Techniques - A Survey and Taxonomy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Hashing Techniques - A Survey and Taxonomy.pdf -------------------------------------------------------------------------------- /Papers/Hashing for Similarity Search - A Survey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Hashing for Similarity Search - A Survey.pdf -------------------------------------------------------------------------------- /Papers/Highly Available Transactions - Virtues and Limitations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Highly Available Transactions - Virtues and Limitations.pdf -------------------------------------------------------------------------------- /Papers/Hive - A Warehousing Solution Over a Map-Reduce Framework.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Hive - A Warehousing Solution Over a Map-Reduce Framework.pdf -------------------------------------------------------------------------------- /Papers/How to Read a Paper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/How to Read a Paper.pdf -------------------------------------------------------------------------------- /Papers/In Search of an Understandable Consensus Algorithm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/In Search of an Understandable Consensus Algorithm.pdf -------------------------------------------------------------------------------- /Papers/Incremental Construction of Compact Acyclic NFAs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Incremental Construction of Compact Acyclic NFAs.pdf -------------------------------------------------------------------------------- /Papers/InfiniFilter - Expanding Filters to Infinity and Beyond.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/InfiniFilter - Expanding Filters to Infinity and Beyond.pdf -------------------------------------------------------------------------------- /Papers/Interactive Checks for Coordination Avoidance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Interactive Checks for Coordination Avoidance.pdf -------------------------------------------------------------------------------- /Papers/Kafka - a Distributed Messaging System for Log Processing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Kafka - a Distributed Messaging System for Log Processing.pdf -------------------------------------------------------------------------------- /Papers/LSM-based Storage Techniques - A Survey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/LSM-based Storage Techniques - A Survey.pdf -------------------------------------------------------------------------------- /Papers/Linear Bidirectional On-Line Construction of Affix Trees.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Linear Bidirectional On-Line Construction of Affix Trees.pdf -------------------------------------------------------------------------------- /Papers/Logic and Lattices for Distributed Programming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Logic and Lattices for Distributed Programming.pdf -------------------------------------------------------------------------------- /Papers/MapReduce.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/MapReduce.pdf -------------------------------------------------------------------------------- /Papers/MillWheel - Fault-Tolerant Stream Processing at Internet Scale.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/MillWheel - Fault-Tolerant Stream Processing at Internet Scale.pdf -------------------------------------------------------------------------------- /Papers/Monkey - Optimal Navigable Key-Value Store.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Monkey - Optimal Navigable Key-Value Store.pdf -------------------------------------------------------------------------------- /Papers/Mostly Order Preserving Dictionaries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Mostly Order Preserving Dictionaries.pdf -------------------------------------------------------------------------------- /Papers/Multiple Set Matching with Bloom Matrix and Bloom Vector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Multiple Set Matching with Bloom Matrix and Bloom Vector.pdf -------------------------------------------------------------------------------- /Papers/Optimal insertion in deterministic DAWGs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Optimal insertion in deterministic DAWGs.pdf -------------------------------------------------------------------------------- /Papers/Optimizing Bloom Filter - Challenges, Solutions, and Comparisons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Optimizing Bloom Filter - Challenges, Solutions, and Comparisons.pdf -------------------------------------------------------------------------------- /Papers/Parallel Implementation of Tree Skeletons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Parallel Implementation of Tree Skeletons.pdf -------------------------------------------------------------------------------- /Papers/PostgreSQL Internals.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/PostgreSQL Internals.pdf -------------------------------------------------------------------------------- /Papers/Practical Implementation of Rank and Select Queries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Practical Implementation of Rank and Select Queries.pdf -------------------------------------------------------------------------------- /Papers/Pregel - A System for Large-Scale Graph Processing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Pregel - A System for Large-Scale Graph Processing.pdf -------------------------------------------------------------------------------- /Papers/Probabilistically Bounded Staleness for Practical Partial Quorums.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Probabilistically Bounded Staleness for Practical Partial Quorums.pdf -------------------------------------------------------------------------------- /Papers/Quantifying eventual consistency with PBS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Quantifying eventual consistency with PBS.pdf -------------------------------------------------------------------------------- /Papers/Readings in Database Systems, 5th Edition - Reading List.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Readings in Database Systems, 5th Edition - Reading List.pdf -------------------------------------------------------------------------------- /Papers/Readings in Database Systems, 5th Edition.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Readings in Database Systems, 5th Edition.pdf -------------------------------------------------------------------------------- /Papers/Resilient Distributed Datasets - A Fault-Tolerant Abstraction for In-Memory Cluster Computing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Resilient Distributed Datasets - A Fault-Tolerant Abstraction for In-Memory Cluster Computing.pdf -------------------------------------------------------------------------------- /Papers/Rosetta - A Robust Space-Time Optimized Range Filter for Key-Value Stores.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Rosetta - A Robust Space-Time Optimized Range Filter for Key-Value Stores.pdf -------------------------------------------------------------------------------- /Papers/Scalable Atomic Visibility with RAMP Transactions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Scalable Atomic Visibility with RAMP Transactions.pdf -------------------------------------------------------------------------------- /Papers/Space-Efficient, High-Performance Rank & Select Structures on Uncompressed Bit Sequences.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Space-Efficient, High-Performance Rank & Select Structures on Uncompressed Bit Sequences.pdf -------------------------------------------------------------------------------- /Papers/Spanner - Google's Globally-Distributed Database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Spanner - Google's Globally-Distributed Database.pdf -------------------------------------------------------------------------------- /Papers/Spark SQL - Relational Data Processing in Spark.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Spark SQL - Relational Data Processing in Spark.pdf -------------------------------------------------------------------------------- /Papers/Spooky - Granulating LSM-Tree Compactions Correctly.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Spooky - Granulating LSM-Tree Compactions Correctly.pdf -------------------------------------------------------------------------------- /Papers/SuRF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/SuRF.pdf -------------------------------------------------------------------------------- /Papers/Succinct Data Structures for Families of Interval Graphs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Succinct Data Structures for Families of Interval Graphs.pdf -------------------------------------------------------------------------------- /Papers/Succinct Data Structures for Retrieval and Approximate Membership.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Succinct Data Structures for Retrieval and Approximate Membership.pdf -------------------------------------------------------------------------------- /Papers/Succinct Representation for (Non)Deterministic Finite Automata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Succinct Representation for (Non)Deterministic Finite Automata.pdf -------------------------------------------------------------------------------- /Papers/Succinct Representation of Trees and Graphs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Succinct Representation of Trees and Graphs.pdf -------------------------------------------------------------------------------- /Papers/Survey and Taxonomy of Lossless Graph Compression and Space-Efficient Graph Representations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Survey and Taxonomy of Lossless Graph Compression and Space-Efficient Graph Representations.pdf -------------------------------------------------------------------------------- /Papers/The Little Book of Semaphores.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/The Little Book of Semaphores.pdf -------------------------------------------------------------------------------- /Papers/The Log-Structured Merge -Bush and the Wacky Continuum.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/The Log-Structured Merge -Bush and the Wacky Continuum.pdf -------------------------------------------------------------------------------- /Papers/Theory and Practice of Chunked Sequences.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Theory and Practice of Chunked Sequences.pdf -------------------------------------------------------------------------------- /Papers/Theory and Practice of Monotone Minimal Perfect Hashing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Theory and Practice of Monotone Minimal Perfect Hashing.pdf -------------------------------------------------------------------------------- /Papers/Thrift - Scalable Cross-Language Services Implementation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Thrift - Scalable Cross-Language Services Implementation.pdf -------------------------------------------------------------------------------- /Papers/Univariate Distribution Relationships.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Univariate Distribution Relationships.pdf -------------------------------------------------------------------------------- /Papers/Xor Filters - Faster and Smaller Than Bloom and Cuckoo Filters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/Xor Filters - Faster and Smaller Than Bloom and Cuckoo Filters.pdf -------------------------------------------------------------------------------- /Papers/YCSB.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/YCSB.pdf -------------------------------------------------------------------------------- /Papers/ZooKeeper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparkie/Programming-Notebook/c6096d28643ffd07f8889730f9939f55f1a8984c/Papers/ZooKeeper.pdf -------------------------------------------------------------------------------- /Programming Languages/C99.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# C99\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "> C99 is the \"ISO/IEC 9899:1999\" version of the C programming language: a general-purpose, procedural programming language." 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "## Documentation\n", 23 | "\n", 24 | "- [Language Documentation](https://en.cppreference.com/w/c/language)\n", 25 | "- [C Standard Library Header Files](https://en.cppreference.com/w/c/header)\n", 26 | "- [C POSIX Header Files](https://pubs.opengroup.org/onlinepubs/9699919799/idx/head.html)\n", 27 | "- [GNU C Style Guide](https://www.gnu.org/prep/standards/html_node/Writing-C.html)" 28 | ] 29 | }, 30 | { 31 | "cell_type": "markdown", 32 | "metadata": {}, 33 | "source": [ 34 | "## Development Environment\n", 35 | "\n", 36 | "- **Compiler**: [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/)\n", 37 | "- **IDE**: [VSCode](https://code.visualstudio.com/)\n", 38 | "- **Build System**: [CMake](https://cmake.org/)\n", 39 | "- **Code Analyzer**: [scan-build](https://clang-analyzer.llvm.org/scan-build.html)\n", 40 | "- **Code Formatter**: [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)\n", 41 | "- **Code Linter**: [clang-tidy](https://clang.llvm.org/extra/clang-tidy/index.html)\n", 42 | "- **Code Coverage**: [LCOV](http://ltp.sourceforge.net/coverage/lcov.php)\n", 43 | "- **Code Search**: [cscope](http://cscope.sourceforge.net/)\n", 44 | "- **Curated Libraries**: [awesome-c](https://github.com/kozross/awesome-c)\n", 45 | "- **Package Configs**: [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | "## Testing\n", 53 | "\n", 54 | "- **Test Library**: [ctest](https://github.com/bvdberg/ctest)\n", 55 | "- **Property-Based Testing**: [pytest](https://docs.pytest.org/en/latest/) + [cffi](https://cffi.readthedocs.io/en/latest/)" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "metadata": {}, 61 | "source": [ 62 | "## Productionizing C99\n", 63 | "\n", 64 | "- **Benchmarking**: [b63](https://github.com/okuvshynov/b63)\n", 65 | "- **Debugger**: [cgdb](https://cgdb.github.io/)\n", 66 | "- **Documentation**: [Doxygen](http://doxygen.nl/)\n", 67 | "- **Dynamic Analysis**: [Valgrind](http://valgrind.org/)\n", 68 | "- **Profiler**: [gprof](https://sourceware.org/binutils/docs/gprof/)" 69 | ] 70 | }, 71 | { 72 | "cell_type": "markdown", 73 | "metadata": {}, 74 | "source": [ 75 | "## Project Templates\n", 76 | "\n", 77 | "- **[jparkie/cookiecutter-c99](https://github.com/jparkie/cookiecutter-c99)**: Cookiecutter template for a C99 application." 78 | ] 79 | } 80 | ], 81 | "metadata": { 82 | "kernelspec": { 83 | "display_name": "Python 3", 84 | "language": "python", 85 | "name": "python3" 86 | }, 87 | "language_info": { 88 | "codemirror_mode": { 89 | "name": "ipython", 90 | "version": 3 91 | }, 92 | "file_extension": ".py", 93 | "mimetype": "text/x-python", 94 | "name": "python", 95 | "nbconvert_exporter": "python", 96 | "pygments_lexer": "ipython3", 97 | "version": "3.7.3" 98 | }, 99 | "toc": { 100 | "base_numbering": 1, 101 | "nav_menu": {}, 102 | "number_sections": false, 103 | "sideBar": false, 104 | "skip_h1_title": false, 105 | "title_cell": "Table of Contents", 106 | "title_sidebar": "Contents", 107 | "toc_cell": false, 108 | "toc_position": {}, 109 | "toc_section_display": false, 110 | "toc_window_display": false 111 | } 112 | }, 113 | "nbformat": 4, 114 | "nbformat_minor": 2 115 | } 116 | -------------------------------------------------------------------------------- /Programming Languages/Java.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Java\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "> Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible." 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "## Documentation\n", 23 | "\n", 24 | "- [Website](https://docs.oracle.com/javase/10/)\n", 25 | "- [Language Documentation](https://docs.oracle.com/javase/tutorial/index.html)\n", 26 | "- [API Documentation](https://docs.oracle.com/javase/10/docs/api/overview-summary.html)\n", 27 | "- [Style Guide](https://google.github.io/styleguide/javaguide.html)\n", 28 | "- [Specifications](https://docs.oracle.com/javase/specs/index.html)\n", 29 | "- [JDK Enhancement Process](http://openjdk.java.net/jeps/0)" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "## Development Environment\n", 37 | "\n", 38 | "- **Java Environment**: [jenv](https://github.com/jenv/jenv)\n", 39 | "- **IDE**: [IntelliJ IDEA](https://www.jetbrains.com/idea/)\n", 40 | "- **Build System**: [maven](https://maven.apache.org/)\n", 41 | "- **Code Formatter**: [google-java-format](https://github.com/google/google-java-format)\n", 42 | "- **Code Linter**: [checkstyle](http://checkstyle.sourceforge.net/)\n", 43 | "- **Code Coverage**: [JaCoCo](https://www.eclemma.org/jacoco/)\n", 44 | "- **All Libraries**: [MVNrepository](https://mvnrepository.com/)\n", 45 | "- **Curated Libraries**: [awesome-java](https://github.com/akullpp/awesome-java)" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | "## Testing\n", 53 | "\n", 54 | "- **Test Library**: [JUnit5](https://junit.org/junit5/)\n", 55 | "- **Mocking**: [mockito](https://site.mockito.org/)\n", 56 | "- **Property-Based Testing**: [QuickTheories](https://github.com/ncredinburgh/QuickTheories)\n", 57 | "- **Containers-Based Testing**: [testcontainers](https://www.testcontainers.org/)\n", 58 | "- **Microbenchmarking**: [jmh](http://openjdk.java.net/projects/code-tools/jmh/)" 59 | ] 60 | }, 61 | { 62 | "cell_type": "markdown", 63 | "metadata": {}, 64 | "source": [ 65 | "## Productionizing Java\n", 66 | "\n", 67 | "- **CLI**: [Commons CLI](http://commons.apache.org/proper/commons-cli/index.html)\n", 68 | "- **Compile-Time Dependency Injection**: [Dagger](https://google.github.io/dagger/)\n", 69 | "- **Run-Time Dependency Injection**: [Guice](https://github.com/google/guice)\n", 70 | "- **Metrics**: [Metrics](https://github.com/dropwizard/metrics)\n", 71 | "- **JSON**: [Jackson](https://github.com/FasterXML/jackson)\n", 72 | "- **YAML**: [Jackson](https://github.com/FasterXML/jackson-dataformats-text)\n", 73 | "- **JAR**: [Maven Shade](https://maven.apache.org/plugins/maven-shade-plugin/)\n", 74 | "- **Packaging**: [Maven Assembly](https://maven.apache.org/plugins/maven-assembly-plugin/)\n", 75 | "- **Release**: [Maven Release](https://maven.apache.org/maven-release/maven-release-plugin/)\n", 76 | "- **Documentation**: [Javadoc](https://docs.oracle.com/javase/10/javadoc/javadoc.htm)" 77 | ] 78 | } 79 | ], 80 | "metadata": { 81 | "kernelspec": { 82 | "display_name": "Python 3", 83 | "language": "python", 84 | "name": "python3" 85 | }, 86 | "language_info": { 87 | "codemirror_mode": { 88 | "name": "ipython", 89 | "version": 3 90 | }, 91 | "file_extension": ".py", 92 | "mimetype": "text/x-python", 93 | "name": "python", 94 | "nbconvert_exporter": "python", 95 | "pygments_lexer": "ipython3", 96 | "version": "3.7.3" 97 | }, 98 | "toc": { 99 | "base_numbering": 1, 100 | "nav_menu": {}, 101 | "number_sections": false, 102 | "sideBar": false, 103 | "skip_h1_title": false, 104 | "title_cell": "Table of Contents", 105 | "title_sidebar": "Contents", 106 | "toc_cell": false, 107 | "toc_position": {}, 108 | "toc_section_display": false, 109 | "toc_window_display": false 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 2 114 | } 115 | -------------------------------------------------------------------------------- /Programming Languages/Python 3.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Python 3\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "> Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms." 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "## Documentation\n", 23 | "\n", 24 | "- [Website](https://www.python.org/)\n", 25 | "- [Language Documentation](https://docs.python.org/3/)\n", 26 | "- [API Documentation](https://docs.python.org/3/library/index.html)\n", 27 | "- [Style Guide](https://www.python.org/dev/peps/pep-0008/)\n", 28 | "- [Specifications](https://docs.python.org/3.7/reference/index.html)\n", 29 | "- [Source Code](https://github.com/python/cpython)\n", 30 | "- [Python Enhancement Proposals](https://www.python.org/dev/peps/)" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "metadata": {}, 36 | "source": [ 37 | "## Development Environment\n", 38 | "\n", 39 | "- **Python Environment**: [pyenv](https://github.com/pyenv/pyenv)\n", 40 | "- **IDE**: [PyCharm](https://www.jetbrains.com/pycharm/)\n", 41 | "- **Editor Plugins**: [Anaconda](http://damnwidget.github.io/anaconda/)\n", 42 | "- **Build System**: [tox](https://tox.readthedocs.io/en/latest/) + [venv](https://docs.python.org/3/library/venv.html) + [pip](https://pip.pypa.io/en/stable/) + [tox-pip-extensions](https://github.com/tox-dev/tox-pip-extensions)\n", 43 | "- **Code Formatter**: [autopep8](https://github.com/hhatto/autopep8)\n", 44 | "- **Code Linter**: [flake8](https://gitlab.com/pycqa/flake8)\n", 45 | "- **Code Coverage**: [Coverage.py](https://coverage.readthedocs.io/en/v4.5.x/)\n", 46 | "- **All Libraries**: [Python Package Index](https://pypi.org/)\n", 47 | "- **Curated Libraries**: [awesome-python](https://github.com/vinta/awesome-python)\n", 48 | "- **Python 2.7 Compatibility**: [six](https://six.readthedocs.io/)\n", 49 | "- **C Compatibility**: [CFFI](https://cffi.readthedocs.io/en/latest/)" 50 | ] 51 | }, 52 | { 53 | "cell_type": "markdown", 54 | "metadata": {}, 55 | "source": [ 56 | "## Testing\n", 57 | "\n", 58 | "- **Test Library**: [pytest](https://docs.pytest.org/en/latest/)\n", 59 | "- **Mocking**: [unittest.mock](https://docs.python.org/3/library/unittest.mock.html)\n", 60 | "- **Property-Based Testing**: [Hypothesis](https://hypothesis.works/)\n", 61 | "- **Microbenchmarking**: [cProfile](https://docs.python.org/3/library/profile.html)" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "metadata": {}, 67 | "source": [ 68 | "## Productionizing Python 3\n", 69 | "\n", 70 | "- **CLI**: [argparse](https://docs.python.org/3/library/argparse.html)\n", 71 | "- **Configuration**: [configparser](https://docs.python.org/3/library/configparser.html)\n", 72 | "- **JSON**: [json](https://docs.python.org/3/library/json.html)\n", 73 | "- **YAML**: [PyYAML](https://pyyaml.org/)\n", 74 | "- **Wheels**: [Wheels](https://pythonwheels.com/)\n", 75 | "- **Packaging**: [setuptools](https://github.com/pypa/setuptools)\n", 76 | "- **Documentation**: [Sphinx](http://www.sphinx-doc.org/en/master/)" 77 | ] 78 | }, 79 | { 80 | "cell_type": "markdown", 81 | "metadata": {}, 82 | "source": [ 83 | "## Project Templates\n", 84 | "\n", 85 | "- **[jparkie/cookiecutter-python-notebook](https://github.com/jparkie/cookiecutter-python-notebook)**: Cookiecutter template for a Jupyter Python 3 notebook.\n", 86 | "- **[jparkie/cookiecutter-python-swagger](https://github.com/jparkie/cookiecutter-python-swagger)**: Cookiecutter template for a Swagger-generated Python server stub." 87 | ] 88 | } 89 | ], 90 | "metadata": { 91 | "kernelspec": { 92 | "display_name": "Python 3", 93 | "language": "python", 94 | "name": "python3" 95 | }, 96 | "language_info": { 97 | "codemirror_mode": { 98 | "name": "ipython", 99 | "version": 3 100 | }, 101 | "file_extension": ".py", 102 | "mimetype": "text/x-python", 103 | "name": "python", 104 | "nbconvert_exporter": "python", 105 | "pygments_lexer": "ipython3", 106 | "version": "3.7.3" 107 | }, 108 | "toc": { 109 | "base_numbering": 1, 110 | "nav_menu": {}, 111 | "number_sections": false, 112 | "sideBar": false, 113 | "skip_h1_title": false, 114 | "title_cell": "Table of Contents", 115 | "title_sidebar": "Contents", 116 | "toc_cell": false, 117 | "toc_position": {}, 118 | "toc_section_display": false, 119 | "toc_window_display": false 120 | } 121 | }, 122 | "nbformat": 4, 123 | "nbformat_minor": 2 124 | } 125 | -------------------------------------------------------------------------------- /Programming Languages/Scala.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Scala\n", 8 | "*Author: Jacob Park*" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "> Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages." 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "## Documentation\n", 23 | "\n", 24 | "- [Website](https://www.scala-lang.org/)\n", 25 | "- [Language Documentation](https://docs.scala-lang.org/)\n", 26 | "- [API Documentation](https://www.scala-lang.org/api/current/)\n", 27 | "- [Style Guide](https://docs.scala-lang.org/style/index.html)\n", 28 | "- [Specifications](https://www.scala-lang.org/files/archive/spec/2.12/)\n", 29 | "- [Source Code](https://github.com/scala/scala)\n", 30 | "- [Scala Improvement Process](https://docs.scala-lang.org/sips/index.html)" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "metadata": {}, 36 | "source": [ 37 | "## Development Environment\n", 38 | "\n", 39 | "- **IDE**: [IntelliJ IDEA](https://www.jetbrains.com/idea/)\n", 40 | "- **Editor Plugins**: [ENSIME](http://ensime.github.io/)\n", 41 | "- **Build System**: [sbt](https://www.scala-sbt.org/)\n", 42 | "- **Code Formatter**: [scalafmt](https://scalameta.org/scalafmt/)\n", 43 | "- **Code Linter**: [scalastyle](http://www.scalastyle.org/)\n", 44 | "- **Code Coverage**: [scoverage](http://scoverage.org/)\n", 45 | "- **All Libraries**: [Scaladex](https://index.scala-lang.org)\n", 46 | "- **Curated Libraries**: [awesome-scala](https://github.com/lauris/awesome-scala)" 47 | ] 48 | }, 49 | { 50 | "cell_type": "markdown", 51 | "metadata": {}, 52 | "source": [ 53 | "## Testing\n", 54 | "\n", 55 | "- **Test Library**: [scalatest](http://www.scalatest.org/)\n", 56 | "- **Mocking**: [mockito](https://site.mockito.org/)\n", 57 | "- **Property-Based Testing**: [scalacheck](http://www.scalacheck.org/)\n", 58 | "- **Containers-Based Testing**: [testcontainers](https://www.testcontainers.org/)\n", 59 | "- **Microbenchmarking**: [sbt-jmh](https://github.com/ktoso/sbt-jmh)" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "metadata": {}, 65 | "source": [ 66 | "## Productionizing Scala\n", 67 | "\n", 68 | "- **CLI**: [scopt](https://github.com/scopt/scopt)\n", 69 | "- **Configuration**: [HOCON Config](https://github.com/lightbend/config)\n", 70 | "- **Compile-Time Dependency Injection**: [macwire](https://github.com/adamw/macwire)\n", 71 | "- **Run-Time Dependency Injection**: [Airframe](https://github.com/wvlet/airframe)\n", 72 | "- **Metrics**: [metrics-scala](https://github.com/erikvanoosten/metrics-scala)\n", 73 | "- **JSON**: [circe](https://github.com/circe/circe)\n", 74 | "- **YAML**: [circe-yaml](https://github.com/circe/circe-yaml)\n", 75 | "- **JAR**: [sbt-assembly](https://github.com/sbt/sbt-assembly)\n", 76 | "- **Packaging**: [sbt-native-packager](https://github.com/sbt/sbt-native-packager)\n", 77 | "- **Release**: [sbt-release](https://github.com/sbt/sbt-release)\n", 78 | "- **Documentation**: [Scaladoc](https://docs.scala-lang.org/overviews/scaladoc/overview.html)\n", 79 | "- **Project Website**: [sbt-microsites](https://github.com/47deg/sbt-microsites)" 80 | ] 81 | }, 82 | { 83 | "cell_type": "markdown", 84 | "metadata": {}, 85 | "source": [ 86 | "## Project Templates\n", 87 | "\n", 88 | "- **[jparkie/cookiecutter-scala-spark](https://github.com/jparkie/cookiecutter-scala-spark)**: Cookiecutter template for a Scala Apache Spark application.\n", 89 | "- **[jparkie/cookiecutter-scala-play](https://github.com/jparkie/cookiecutter-scala-play)**: Cookiecutter template for a Scala Play 2 application." 90 | ] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.6.5" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 2 114 | } 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Programming Notebook](https://github.com/jparkie/Programming-Notebook) 2 | 3 | A collection of [BeakerX](http://beakerx.com/) IPython notebooks and PDFs about various topics I actively study. 4 | 5 | ## Layout 6 | 7 | - **Big Data**: A collection of anecdotal notes regarding *Big Data*. 8 | - **Books**: A collection of detailed notes regarding various books in STEM which I have read. 9 | - **Courses**: A collection of notes from my senior year in ECE at the University of Waterloo. 10 | - **Data Structures and Algorithms**: A collection of detailed notes regarding *Data Structures and Algorithms* when preparing for a technical interview in Java. 11 | - **Databases**: A collection of detailed notes regarding *DBMSs*. 12 | - **Papers**: A collection of papers and surveys of various topics in STEM which I have read. 13 | - **Programming Languages**: A reference to documentation, development, testing, and productionizing, given a programming language. 14 | - **References**: A reference of various topics in STEM each with a hyperlink to an article introducing it. 15 | 16 | ## Links 17 | 18 | - **Big Data** 19 | - [Big Data Ecosystem](http://jparkie.github.io/Programming-Notebook/Big%20Data/Big%20Data%20Ecosystem.html) 20 | - **Books** 21 | - [Anomaly Detection Principles and Algorithms](http://jparkie.github.io/Programming-Notebook/Books/Anomaly%20Detection%20Principles%20and%20Algorithms/Anomaly%20Detection%20Principles%20and%20Algorithms.html) 22 | - [Crucial Conversations](http://jparkie.github.io/Programming-Notebook/Books/Crucial%20Conversations/Crucial%20Conversations.html) 23 | - [Database System Concepts](http://jparkie.github.io/Programming-Notebook/Books/Database%20System%20Concepts/Database%20System%20Concepts.html) 24 | - [Probability and Statistics for Computer Science](http://jparkie.github.io/Programming-Notebook/Books/Probability%20and%20Statistics%20for%20Computer%20Science/Probability%20and%20Statistics%20for%20Computer%20Science.html) 25 | - **Courses** 26 | - [ECE 405 - Introduction to Quantum Mechanics](http://jparkie.github.io/Programming-Notebook/Courses/ECE405/ECE405%20Notes.html) 27 | - [ECE 453 - Software Testing, Quality Assurance, and Maintenance](http://jparkie.github.io/Programming-Notebook/Courses/ECE453/ECE453%20Notes.html) 28 | - [ECE 454 - Distributed Computing](http://jparkie.github.io/Programming-Notebook/Courses/ECE454/ECE454%20Notes.html) 29 | - [ECE 457A - Cooperative and Adaptive Algorithms](http://jparkie.github.io/Programming-Notebook/Courses/ECE457A/ECE457A%20Notes.html) 30 | - [ECE 459 - Programming for Performance](http://jparkie.github.io/Programming-Notebook/Courses/ECE459/ECE459%20Notes.html) 31 | - [ECE 493 - Probabilistic Reasoning and Decision Making](http://jparkie.github.io/Programming-Notebook/Courses/ECE493/ECE493%20Notes.html) 32 | - **Data Structures and Algorithms** 33 | - [1\. Java Standard Library](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/1.%20Java%20Standard%20Library.html) 34 | - [2\. Data Structures](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/2.%20Data%20Structures.html) 35 | - [3\. Sorting and Searching](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/3.%20Sorting%20and%20Searching.html) 36 | - [4\. Combinations and Permutations](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/4.%20Combinations%20and%20Permutations.html) 37 | - [5\. Backtracking](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/5.%20Backtracking.html) 38 | - [6\. Dynamic Programming](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/6.%20Dynamic%20Programming.html) 39 | - [7\. Graphs](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/7.%20Graphs.html) 40 | - [8\. Trees](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/8.%20Trees.html) 41 | - [9\. Bit Hacks](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/9.%20Bit%20Hacks.html) 42 | - [10\. Strings](http://jparkie.github.io/Programming-Notebook/Data%20Structures%20and%20Algorithms/10.%20Strings.html) 43 | - **Databases** 44 | - [Architecture of a Database System](http://jparkie.github.io/Programming-Notebook/Databases/Architecture%20of%20a%20Database%20System/Architecture%20of%20a%20Database%20System.html) 45 | - [PostgreSQL](http://jparkie.github.io/Programming-Notebook/Databases/PostgreSQL/PostgreSQL%2012.html) 46 | - [**Papers**](https://github.com/jparkie/Programming-Notebook/tree/master/Papers) 47 | - **Programming Languages** 48 | - [C99](http://jparkie.github.io/Programming-Notebook/Programming%20Languages/C99.html) 49 | - [Java](http://jparkie.github.io/Programming-Notebook/Programming%20Languages/Java.html) 50 | - [Python 3](http://jparkie.github.io/Programming-Notebook/Programming%20Languages/Python%203.html) 51 | - [Scala](http://jparkie.github.io/Programming-Notebook/Programming%20Languages/Scala.html) 52 | - [**References**](http://jparkie.github.io/Programming-Notebook/References.html) 53 | 54 | ## Converting Notebooks to HTML 55 | 56 | ### Pre-Commit 57 | 58 | 1. Install `pre-commit`. 59 | ``` 60 | pip install pre-commit 61 | ``` 62 | 2. Clone the repository. 63 | ``` 64 | git clone git@github.com:jparkie/Programming-Notebook.git 65 | ``` 66 | 3. Initialize `pre-commit` in the repository root directory. 67 | ``` 68 | pre-commit install 69 | ``` 70 | 4. Convert all BeakerX IPython notebooks into HTML. 71 | ``` 72 | pre-commit run --all-files 73 | ``` 74 | --------------------------------------------------------------------------------