Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Foundations

DSA and problem solving cheat sheet (C++)

Opens with credits

A quick-revision companion to the DSA roadmap in its C++ edition: complexity, core data structures with vector, unordered_map, map and priority_queue, recursion, trees, graphs, coding patterns, dynamic programming and timed practice. Skim a chapter before a project, an exam or a coding round.

Curated by Tauseef Fayyaz9 chapters76 concepts160 glossary terms

Chapters

9 chapters · 76 concepts

  1. 1Complexity and Big-OHow to say what code costs in time and memory before running it. Every later chapter trades one of these costs for another.7 concepts
  2. 2Arrays, strings and hashingContiguous sequences and hash-based lookup, the structures most problems are built on, and exactly what your language gives you for each.8 concepts
  3. Linked lists, stacks and queuesPointer-based lists and the structures that control the order work is done in: last in first out, first in first out, and both ends.7 conceptsOpens with credits
  4. Recursion, sorting and searchingTrusting recursion, the classic sorts and what they cost, and binary search with its boundary variants, including searching over the answer.10 conceptsOpens with credits
  5. Trees and heapsHierarchical structures, the traversals that answer most questions about them, and heaps for anything that needs the smallest or largest item fast.7 conceptsOpens with credits
  6. GraphsNodes and edges, and the algorithms that search, order and connect them. Grids, schedules and dependency lists are often graph problems in disguise.9 conceptsOpens with credits
  7. Coding patternsRecognisable problem shapes that turn a brute force into an efficient solution. Name the pattern and the signal that told you before writing any code.10 conceptsOpens with credits
  8. Dynamic programmingRecursion plus a cache, then the handful of problem families most DP questions belong to. Start from the state and the recursion, never from the table.10 conceptsOpens with credits
  9. Timed practice and problem-solving habitsThe routine that makes you reliable under a clock, whether in a contest, an exam or a coding round: clarify, plan, code, test and review.8 conceptsOpens with credits
  10. 10Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.160 terms

About this sheet

Data structures and patterns.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com