-
50 C# interview questions
•
Here are 50 C# interview questions with answers More C# interview questions How Does the ThreadPool Work Difference Between Task and Thread in C# Why is Task More Efficient in C# 1. What is the difference between const, readonly, and static in C#? English: const defines a constant value that…
-
50 Python Interview Questions
•
Here are 50 Python interview questions with answers 1. What are Python decorators and how do they work? English: Python decorators are a way to modify or extend the behavior of functions or methods. They are often used for logging, access control, instrumentation, caching, etc. A decorator is a function…
-
Python 101: What are Python Decorators and How Do They Work?
•
What are Python Decorators and How Do They Work? English Explanation: Python decorators are a powerful tool to modify or extend the behavior of functions or methods. They are often used in scenarios such as: Logging: Automatically log calls to functions. Access Control: Restrict access to certain functions based on…
-
LeetCode: 695 Max Area of Island
•
You are given an m x n binary matrix grid representing a map of ‘1’s (land) and ‘0’s (water). An island is a group of 1s (representing land) connected 4-directionally (horizontal or vertical). You may assume all four edges of the grid are surrounded by water. The area of an…
-
LeetCode: 733 Flood Fill
•
An image is represented by an m x n integer grid image where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and color. You should perform a "flood fill" on the image starting from the pixel image[sr][sc]. To perform a "flood fill",…
-
LeetCode: 130 Surrounded Regions
•
Given an m x n matrix board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. Example: Input: board = [ ["X","X","X","X"], ["X","O","O","X"], ["X","X","O","X"], ["X","O","X","X"] ] Output: [ ["X","X","X","X"], ["X","X","X","X"], ["X","X","X","X"], ["X","O","X","X"] ] Explanation: Surrounded…
-
LeetCode: 200 Number of Islands
•
Given an m x n 2D binary grid grid which represents a map of ‘1’s (land) and ‘0’s (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are…
-
Python 101: Comparison: `defaultdict` vs `Counter` in Python
•
Comparison: defaultdict vs Counter in Python Overview defaultdict English: defaultdict is a subclass of dict that provides a default value for a non-existent key when accessed. It simplifies the handling of missing keys, allowing you to define what the default value should be for each key that doesn’t exist. Chinese:…
-
LeetCode: 383 Ransom Note
•
Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise. Each letter in magazine can only be used once in ransomNote. Example: Input: ransomNote = "a", magazine = "b" Output: false Example: Input: ransomNote = "aa", magazine =…
-
Docker 101: Microservices Architecture with Docker Networking
•
Microservices Architecture with Docker Networking (微服务架构与 Docker 网络) Introduction / 介绍 Microservices architecture involves breaking down an application into smaller, independent services that can be developed, deployed, and scaled independently. Each service typically runs in its own container and communicates with other services over a network. Docker networking allows these…