wasPrime
  • Home
  • Archives
  • Categories
  • Tags
  • About

Learn coroutine - A asymmetric coroutine library for C

Recently I learned a library that implements asymmetric coroutine in C, and added some comments to help understand. Actually, it’s a brief library so that we don’t have to cost too much time to read.
2023-05-03
library > coroutine
#c #library #coroutine

Introduction to std::string_view/std::span

std::string_viewstd::string_view is imported in C++17. It stores the address of a string and its length. In some cases, it can avoid the overhead of copying strings such as in the parameter of functio
2023-05-02
dev > cpp > stl
#cpp #cpp17 #cpp20 #stl #string_view #span

LeetCode 28 - Find the Index of the First Occurrence in a String

Difficulty: medium Problem DescriptionEnglish (Find the Index of the First Occurrence in a String)Given two strings needle and haystack, return the index of the first occurren
2023-05-01
algorithm > leetcode > sliding_window
#algorithm #sliding_window #leetcode #medium #string #kmp

Introduction to C++20 Coroutines - Part 5 stackful/stackless and Symmetric Transfer

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-30
dev > cpp > stl > coroutine
#cpp #cpp20 #stl #coroutine

Introduction to C++20 Coroutines - Part 4 Some examples about co_await

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-29
dev > cpp > stl > coroutine
#cpp #cpp20 #stl #coroutine

Traverse Binary Tree

Binary tree traversal is a typical problem to implement. I suppose it’s a required course for every programmer to master. I mean, not only recursive traversals, but also non-recursive traversals in pr
2023-04-28
algorithm > design
#algorithm #design #stack #binary_tree #dfs

Calculator for Four Arithmetic with Brackets

It’s a typical problem to implement a four arithmetic calculator with brackets. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646
2023-04-27
algorithm > design
#algorithm #design #calculator #stack

LeetCode 718 - Maximum Length of Repeated Subarray

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

Visual Studio freezing (crashing) while loading solution

ProblemWhen opening a solution, Visual Studio is not responding after displaying “reading the file…”. Solution Close the Visual Studio process. Remove the .vs folder in the folder where the solution f
2023-04-25
configuration > visual_studio
#configuration #visual_studio #environment

Introduction to C++20 Coroutines - Part 3 Some tips about life cycle when using coroutines

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-24
dev > cpp > stl > coroutine
#cpp #cpp20 #stl #coroutine
1…456789

Search

Hexo Fluid