New Algorithms in C++23 - Conor Hoekstra - CppNorth 2023
Vložit
- čas přidán 9. 10. 2023
- www.cppnorth.ca
---
Guide to the New Algorithms in C++23 - Conor Hoekstra - CppNorth 2023
C++23 has made a number of very important additions to the Ranges library that was introduced in C++20. This talk will be an overview everything new in the C++23 Ranges library as well as a high level overview of all the different "types" of algorithms in C++ (from C++98 to C++23).
---
Slides: github.com/CppNorth/CppNorth_...
Sponsored By:
think-cell: www.think-cell.com/cppnorth
JetBrains: www.jetbrains.com/
---
Conor Hoekstra
Conor (he/him) is a Research Scientist at NVIDIA working on array programming models and languages. He is extremely passionate about programming languages, algorithms and beautiful code. He is the founder and organizer of the Programming Languages Virtual Meetup, he has a CZcams channel and is the host of two podcasts:
ADSP: Algorithms + Data Structure = Programs
ArrayCast
Conor is also an avid conference speaker. You can find all of Conor's conference talks and podcast appearances (on other podcasts) here github.com/codereport/Content...
---
CppNorth is an annual C++ conference held in Toronto, Canada.
- Annual CppNorth C++ conference: cppnorth.ca/
- CppNorth Twitter: / cppnorth
---
CZcams Videos Edited & Optimised by Digital Medium: events.digital-medium.co.uk
#cppnorth #cpp #cppprogramming - Věda a technologie
Conor is easily one of the best programming speakers! Combinatorial logic and array programming are such interesting subjects. Keep up the great work!
1:21:28 on CppOnSea there was a talk by Tina Ulbrich which looked at runtime performance (and had pitfalls): czcams.com/video/l8D6CAN2rCk/video.html
Nice talk although the comparison with imperative solution was a little unfair, since imperative implementation was unnecessarily verbose and complex. My naive solution for codeforces was
```
#include
#include
#include
int main() {
int n; std::cin >> n;
int mx = 0, curr = 0, prev = 0, val = 0;
for (int i = 0; i < n; ++i) {
int sushi; std::cin >> sushi;
if (val == sushi) ++curr; else prev = std::exchange(curr, 1);
val = sushi;
mx = std::max(mx, std::min(curr, prev));
}
std::cout
His solution of sushi for 2 is undefined behaviour if input vector is of size 0 or 1.
In that case max will be applied on an empty range!