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. …
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 Output: [3,3,5,5,6,7] Explanation: Window position Max --------------- …
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.
A hash table is a dynamic set that supports the dictionary operations of INSERT, SEARCH, and DELETE with average O(1) time complexity.
How does a hash table work under the hood? Let’s figure it out in this post.
To understand a hash table, the direct address table is the first concept we should understand.
A cache’s primary purpose is to increase data retrieval performance by reducing the need to access the underlying slower storage layer.
Trading off capacity for speed, a cache typically stores a subset of data transiently, in contrast to databases whose data is usually complete and durable.
An LRU cache stands for Least Recently Used cache. It is an efficient cache data structure that can be used to figure out what we should evict when the cache is full. It has the following features:
Developer in China, AI and machine learning enthusiast