wasPrime
  • Home
  • Archives
  • Categories
  • Tags
  • About

LeetCode 72 - Edit Distance

Difficulty: hard Problem DescriptionEnglish (Edit Distance)Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You h
2023-04-13
algorithm > leetcode > dynamic_programming
#algorithm #leetcode #hard #dynamic_programming #dp

LeetCode 1143 - Longest Common Subsequence

Difficulty: medium Similar problem: LeetCode 718 - Maximum Length of Repeated Subarray Problem DescriptionEnglish (Longest Common Subsequence)Given tw
2023-04-12
algorithm > leetcode > dynamic_programming
#algorithm #leetcode #medium #dynamic_programming #dp

Allocator in STL

new/delete new operator as our familiar new operator, includes 2 steps: operator new to allocate memory placement new to call constructor delete operator as our familiar delete operator, also i
2023-04-11
dev > cpp > stl
#basic #cpp #stl #allocator

等边/任意三角形的内三角形最小周长

等边三角形的内三角形最小周长今天弟弟问了一道初中数学题:三角形 ABC 是一个等边三角形,动点 P、M、N 分别在线段 AB、BC、AC 上运动,三角形 ABC 边长是 2,求三角形 PMN 的周长最小值。 题目可以概括为 等边三角形的内三角形最小周长,其解题思路和将军饮马问题一脉相承。 在解答这道题之前,可先尝试解答其更通用的形式:任意三角形的内三角形最小周长。 任意三角形的内三角形最小周长
2023-04-10
math
#math #triangle

Configure iTerm2 and Zsh

To configure the environments as below:Oh My ZshPowerline fontagnoster themeZsh extensionszsh-syntax-highlightingzsh-autosuggestions Install Oh My Zsh123sh -c "$(curl -fs
2023-04-09
configuration > iterm2
#configuration #iterm2 #zsh

Introduction to C++20 Coroutines - Part 1 Generator

This series is related to C++20 coroutine.part 1: Generatorpart 2: co_await/co_returnpart 3: Some tips about life cycle when using coroutinespart 4: Some examples about co_awaitpart
2023-04-08
dev > cpp > stl > coroutine
#cpp #cpp20 #stl #coroutine

.NET HttpWebRequest Connection Limit

TrapRecently I stuck in a trap. There is a performance issue in the project I’m taking responsibility for. There is an interface in the project. As a .NET client, it would send quite a few keys to ser
2023-04-07
dev > csharp
#csharp #dot_net

Some Template Meta Programming Practices

A discoveryI found a case that struck me. 12345678910template <class T>struct temp { T value;};template <class T, class... Ts>struct temp { temp<T> value_temp;
2023-04-06
dev > cpp > template
#cpp #template #template_meta_programming #tmp

promise/async/packaged_task/shared_future

std::promise123456789101112131415161718192021#include <chrono>#include <functional>#include <future>#include <iostream>#include <thread>void promise_set_value(std::promis
2023-04-05
dev > cpp > stl
#cpp #cpp11 #multi_thread #promise #future #packaged_task #shared_future

vtable, type_info and RTTI

vtable’s concept is familiar to us, as well as type_info. They are different sides of implementation of RTTI - Runtime Type Identification.With them, we can get the real type of an object and call ove
2023-04-04
dev > cpp > rtti
#cpp #rtti #vtable #vfunction #type_info
1…6789

Search

Hexo Fluid