Jenkins Tutorial pt.2 - Setup Docker build pipeline and deploy on servers

Welcome to the second part of the tutorial! We are going to build a docker image and push it to AWS’s ECR docker registry. PrerequisitesFirst, of course, y...

Jenkins Tutorial pt.1 - Installing Jenkins on Ubuntu 18.04 and Setup

Prerequisites:Install Java 8.Note the version number! If you directly install the default jdk, it won’t be 8! 123sudo apt updatesudo apt install openjdk-8-j...

Useful Commands when Fixing EBS in EC2

When there is problem with your EBS Volume, you can try detach the root device, attaching it to another device and access it to fix it. To attach: mount /d...

Deploy Django on AWS EC2

set up instanceFirst, you need to have an AWS IAM account, and set up and instance.Next, you can SSH into the instance with ssh -i key.pem end_pointOnce you ...

[LeetCode] Minimum Height Tree

Topological Sort to find root 1234567891011121314151617181920212223242526272829def findMinHeightTrees(self, n, edges): # Wirte your code here if n == 1...

Fenwick Tree / Binary Indexed Tree

Fenwick Tree, or Binary Indexed Tree, is a data structure for range queries.It is similar to Segment Tree, however A simple implementation for constructing F...

[LeetCode] Graph Valid Tree

By definition, we know that “tree” is a acyclic, connected graph.Therefore, in this problem, we only need to check if it’s acyclic and connected. The basic...

AVL Tree and Red-Black Tree

We know that when inserting or searching nodes, the time complexity is O(h), where h denotes the height of tree. Therefore, if the tree is very skewed to one...

Tree Key Point Review

Tree is an important data structure.There are multiple ways to implement, today we are going to talk about the most common 2 ways. ImplementationHashMapHas...

[LeetCode] Binary Tree Longest Consecutive Sequence

This problem is the first of its series.The initial thought might be from each node, check the consecutive sequence starting from itself. However, this will...