Блог пользователя prakharmishra

Автор prakharmishra, история, 15 месяцев назад, По-английски

Hello Everyone,

  1. I found this C++ STL (standard template library) sheet online. Useful for someone starting out. Contains mostly everything about the basic data structures and how to implement them.
    Attaching link to pdf, Link

  2. Also attaching a small document I made, contains frequently used functions and tricks like finding MEX of array, nCr(combination), GCD, LCM, Seive, binary exponentiation for finding power etc.
    Attaching link to document, Link

Preview,


PS: Please suggest if you have more such functions or notice any errors and I'll fix them right away.
UPD: Added some questions in the document to practice.
UPD2: A list of most commonly asked DSA algorithms in interviews — Link

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

Apparently, posting something useful leads to downvotes

  • »
    »
    15 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +2 Проголосовать: не нравится

    I can see the amount of work you put in, but the title should be C++ STL for BEGINNERSanyway, good work. Maybe consider compiling a standard list of bsearch/graph/DP problems it would be helpful.

    • »
      »
      »
      15 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится -6 Проголосовать: не нравится

      Thanks for the feedback! As for the problem list, I’ll try to compile one based on the problems I’ve come across on Codeforces.
      Meantime, if you require some standard questions for interviews, GFG already has a list of top-10 DSA algo's. I'll update it in the blog for now.

»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

Auto comment: topic has been updated by prakharmishra (previous revision, new revision, compare).

»
15 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +11 Проголосовать: не нравится

This all seems pretty nice and useful (if it were posted on HackerRank, maybe). I went through all of it, and everything mentioned is either: 1. Trivial. 2. part of people's template code. 3. one Google search away. I felt like an LGM going through all of it xD. I'm 800 now (mentioning rating for when i look back at the good ol days xD)

  • »
    »
    15 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится -6 Проголосовать: не нравится

    I posted this for people who have started out as they don't know these stuff. It saves a lot of time. In a contest, searching for ways to find (say nCr) might take away precious time and also it happened to me that I was not able to find the most optimal way to do so when I started. Went through some blogs and submissions of red coders and compiled these.

»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Helpful

»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

genuinely helpful kudos !!

»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The first sheet would be useful, but:

  • It's very incomplete. Where is multiset, where is set::count or set::contains? What about creating a set/priority_queue with a different comparator?

  • It has mistakes, for example the time complexity of unordered_map::clear is O(n + number of buckets) not O(n).