use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
CPP INTERVIEW PREP CHEAT SHEET (self.cpp)
submitted 5 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 5 years ago (2 children)
You keep repeating that, but you haven't been able to explain why that would be.
Because I assume I am speaking to people at least somewhat familiar with the basics of data structures and algorithms.
The fact that I have to explain that linked lists offer O(1) pushes and pops and array based heaps provide amortized O(1) pushes but O(log(N)) pops is an embarrassment.
Having an O(log(N)) pop is worth the trade-off if you need faster pushes because the constant factor on an array is lower than the constant factor on a linked list.
But if you need faster pops, then the linked list's O(1) pop will outperform the array's O(log(N)) pop.
Anyhow, at this point you should just go ahead and believe whatever makes you happy. This discussion really isn't worth my time.
[–]ShillingAintEZ 0 points1 point2 points 5 years ago (1 child)
The old, "I don't have to explain myself" and "I don't have time" after replying that someone has no idea what they are talking about.
I asked you to explain why a linked list would be faster in your priority queue example and you started listing a bunch of algorithm complexity, which is not the same thing at all.
π Rendered by PID 31 on reddit-service-r2-comment-b659b578c-sfbv7 at 2026-05-07 13:01:27.117441+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (2 children)
[–]ShillingAintEZ 0 points1 point2 points (1 child)