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 ...
Github Action with Azure
Github Action with AzureIn this post, I will demonstrate a pipeline that is triggered only when code is pushed to the testing or main branch. The pipeline includes static code analysis, unit testing, and an image vulnerability scan. After these checks, the container image is deployed to Azure Kubernetes Service (AKS). Proccess Code RepoCode Repo Features Dev Backend Code checks - Code Analysis, Test UAT Backend CI - Test, Build, and Deploy to UAT PROD Backend CD - Deploy Backend Services to A...
Stack
StackA stack is a linear data structure that follows the Last In, First Out (LIFO) principle. It allows for adding and removing elements in a specific order, where the last element added is the first one to be removed. 123456789101112131415161718192021222324252627class Stack: def __init__(self): self.__items = [] def __str__(self): return str(self.__items) @property def size(self): return len(self.__items) def is_empty(self): return len(self.__items)...
LinkedList
LinkedListA linked list is a linear data structure that consists of a sequence of nodes, where each node contains data and a reference (or link) to the next node in the sequence. Unlike arrays, linked lists do not require contiguous memory allocation, allowing for dynamic memory usage and efficient insertion and deletion operations. the props of linked list: Dynamic size: Linked lists can grow or shrink in size as needed, without the need for contiguous memory allocation. Efficient insertion...
Array
ArrayArray is a linear data structure that stores elements in contiguous memory locations. Each element can be accessed directly using its index, which allows for efficient retrieval and modification. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869class Array: def __init__(self,capacity =8): self.__capacity = capacity self.__size = 0 self.__items = [0] * capacity def __str__(self): arr_str = "...
Azure Container registries
After building our artifacts, we need a place to store them. Common options include Docker Hub, Nexus Repository, Google Container Registry, and Amazon Elastic Container Registry. In this section, we’ll focus on Azure Container Registry (ACR). Creating an Azure Container Registry Select the appropriate Resource Group. Enter a unique Registry Name. Leave all other settings at their default values and proceed with the creation. Configure Credentials for Local Container ManagementThere are two...









