Tree
TreeA tree is a hierarchical data structure that consists of nodes connected by edges. Each node contains a value and may have child nodes, forming a parent-child relationship. The topmost node is called the root, and nodes with no children are called leaves. Trees are used to represent various types of data, such as organizational structures, file systems, and hierarchical relationships. Types of Trees Binary Tree: A tree where each node has at most two children, referred to as the left and ...
Leetcode - 3. Longest Substring Without Repeating Characters
DescriptionGiven a string s, find the length of the longest substring without duplicate characters. Example 1:123Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc", with the length of 3.Example 2:123Input: s = "bbbbb"Output: 1Explanation: The answer is "b", with the length of 1.Example 3:123Input: s = "pwwkew"Output: 3Explanation: The answer is "wke", with the length of 3.Notice that the answer must be a substring, “pwke”...
mininet
What is Mininet?Mininet is a lightweight network emulator that creates a virtual network with hosts, switches, links, and controllers all on a single machine. It’s widely used in Software-Defined Networking (SDN) research and education.mininet Key Features Lightweight and runs real code (like real Linux hosts) Allows fast prototyping of large networks Integrates well with OpenFlow and SDN controllers like POX, Ryu, and ONOS Installationmininet download Basic Concepts Host: virtual end device...
HashTable
HashTableA hash table is a data structure that implements an associative array, which maps keys to values. It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. Hash FunctionA hash function is a function that takes an input (or “key”) and returns a fixed-size string of bytes. The output is typically a hash code that represents the input data. A good hash function should have the following properties: Deterministic: The same ...
Leetcode - 2. Add Two Numbers
DescriptionYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Example 1:123Input: l1 = [2,4,3], l2 = [5,6,4]Output: [7,0,8]Explanation: 342 + 465 = 807. Example 2:12Input: l1 = [0], l2 = [0]Output: [0]Example 3:12Input: l1 = [9,9...
Leetcode - 1. Two Sum
DescriptionGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1:123Input: nums = [2,7,11,15], target = 9Output: [0,1]Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].Example 2:12Input: nums = [3,2,4], target = 6Output: [1,2]Example 3:12Input: nums = [3,3], ...
Using Hexo to Build a Personal Blog
Build Your Own Blog with HexoThis guide walks you through the process of creating a personal blog using Hexo. It includes environment setup, Hexo installation, theme configuration, and running the site locally. 1. Install Development Environment (Node.js)Download and install the LTS version of Node.js from the official website: 🔗 https://nodejs.org/en 2. Install Hexo and Initialize BlogRun the following commands in your terminal: 12345npm install -g hexo-cli # Install Hexo CLI glo...
Leetcode - 812. Largest Triangle Area
DescriptionGiven an array of points on the X-Y plane points where points[i] = [xi, yi], return the area of the largest triangle that can be formed by any three different points. Answers within 10-5 of the actual answer will be accepted. Example 1: 123Input: points = [[0,0],[0,1],[1,0],[0,2],[2,0]]Output: 2.00000Explanation: The five points are shown in the above figure. The red triangle is the largest. 12345Constraints:3 <= points.length <= 50-50 <= xi, yi <= 50All the given point...
Queue
QueueQueue is a linear data structure that follows the First In First Out (FIFO) principle. Elements are added at the rear (enqueue) and removed from the front (dequeue). Circular QueueA circular queue is a linear data structure that follows the FIFO principle but connects the end of the queue back to the front, forming a circle. This allows for efficient use of space by reusing empty slots created by dequeued elements. 1234567891011121314151617181920212223242526public class CircularQueue ...








