Leetcode 543 Diameter of Binary Tree

Leetcode 543 Diameter of Binary Tree

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the 

[StorageSystem] SSD

[StorageSystem] SSD

Write Amplification in SSD We need to have a map betwwen LBA to PBA, logical block address to physical block address. In DRAM, overwrite/ update would be relatively easy, find the address, and then replace the old value with the new value directly. But it 

Leetcode 76 Minimum Window Substring 最小窗口子串

Leetcode 76 Minimum Window Substring 最小窗口子串

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Input: S = “ADOBECODEBANC”, T = “ABC” Output: “BANC” Note: If there is no such window in S that 

[DatabaseSystem] Database Storage 1

[DatabaseSystem] Database Storage 1

Today we would focus on how data organized in disk. DBMS would assume that the primary storage is lied on the non-volatile storage. Storage Hierarchy Overview Typical Storage Layer: cpu register cpu cache DRAM (Non-volitile memory) SSD HDD Network Storage Usually data is moved from 

[Storage System] High Level Overview and Perofrmance Metrics

[Storage System] High Level Overview and Perofrmance Metrics

Software (file systems, device drivers, firmware) and Hardware (servers, devices, controllers, interconnect) that collectively provide application writers with an infrastructure that retains persistent data and provides it on request

[DatabaseSystem] Advanced SQL

[DatabaseSystem] Advanced SQL

SQL is a kinf of relational languages, in which users only need to specify the answer that they want, not how to compute it. The DBMS is reponsible for efficient evaluate and optimize the query.

[DatabaseSystem] Database Introduction And Relational Model

[DatabaseSystem] Database Introduction And Relational Model

Database System is an organized collection of inter-related data that models some aspect of the real-world. Databases are core of most computer applications. Before the whole course discussion, first question is that why we need database system.

Leetcode 261. Graph Valid Tree 无向图成环问题

Leetcode 261. Graph Valid Tree 无向图成环问题

题目大意 Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make up a valid tree. Example 1: Input: n = 5, and edges = [[0,1],