Despite having seen all these concepts more than a thousand times, I’m still getting confused sometimes. Is there a good way to think about all these concepts so that they start making sense?
In this post, I will focus on how to remember them. If you’re not familiar with them, please read the following posts first.
A confusion matrix is a table used to evaluate the performance of a classification model. It summarizes the count combinations of every predicted and actual class.
Let’s understand this concept in a simple example. Below…
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries.
Redis is the world’s most popular in-memory data structure server. In order to make good use of it, we need to understand its basic data structures first.
The Redis String type is the simplest type of value you can associate with a Redis key. …
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
In this post, we are gonna discuss how to calculate the total Hamming distance
Given an integer array
nums, return the sum of Hamming distances between all the pairs of the integers in
Input: nums = [4,14,2]
In binary representation, the 4 is 0100, 14 is 1110, and 2 is 0010 (just
showing the four bits relevant in this case). …
Indexes are used to find rows with specific values quickly.
If a table has an index for the column in question, MySQL can quickly determine the position to seek in the middle of the data file without having to look at all the data. It is much faster than reading every row sequentially.
In this post, we’ll look at some of the important concepts behind indexing.
Let’s first create a MySQL table.
CREATE TABLE Customer(
);ALTER TABLE `Customer` ADD PRIMARY KEY (`custId`);ALTER TABLE `mobileNo` ADD UNIQUE INDEX (`MobileNo`);
Assume we have a…
In this post, we are gonna discuss multiple solutions for sliding window maximum problem.
If you prefer to learn through videos, please have a look at the following video.
You are given an array of integers, there is a sliding window of size
k which is moving from the very left of the array to the very right. You can only see the
k numbers in the window. Each time the sliding window moves right by one position.
Return the max sliding window.
Input: nums = [1,3,-1,-3,5,3,6,7], k = 3
In the past few years, I had participated hundreds of web scraping projects. In the meantime, I had encountered a lot of scraping challenges.
In this post, I will list some scraping challenges and hope they will give you some help for the next interview.
Recently, I needed to install the Catalina Mac System on my MacBooks. So I decide to make a bootable USB disk myself.
Let’s get started!
Converting the PNG file to JPG doesn’t need any fancy software. There is a function baked into macOS and accessible to Automator.
You can set it up as a Quick Action so that you can right-click on the file and convert it to JPG with a single click.
Suppose you are in a library and want to find a book on a certain bookshelf. Book arranges in alphabetical order or by some integer code.
Generally speaking, the naive way to find it is to go book by book, but this will take a lot of time. You think there must be a better solution.
Binary Search Algorithm！
In computer science, binary search, also known as half-interval search, is a search algorithm that finds the position of a target value within a sorted array.
The binary search algorithm is used to search an item from an sorted/sorted…
Last week, I bought a mechanical keyboard and started to think it’s time to reduce my dependence on the mouse and to increase working productivity and efficiency.
A study says if your job requires you to be working on a computer throughout each standard 8-hour workday, then using keyboard shortcuts can save you 8 entire workdays every year. This is equal to 3.3% of your total productivity!
So in this post, I will list my most commonly used keyboard shortcuts and hope they will help everyone work efficiently.
Developer in China, AI and machine learning enthusiast