Decoder_69's blog

By Decoder_69, history, 6 weeks ago, In English

Hello Coders!!I need some suggestion while I have started learning STL I have learned vectors,pairs etc but I didn't get the approach to apply which stl nd where in the question.Plzz suggest something from where I get good grasp in stl nd some resourses to learn STL..any suggestion will be welcome.

 
 
 
 
  • Vote: I like it
  • -14
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it +36 Vote: I do not like it

Practice.

  • »
    »
    6 weeks ago, # ^ |
    Rev. 2   Vote: I like it -10 Vote: I do not like it

    Probably after your comment — "I know I have to practice but do you have any effective strategies for practice?"

    Edit: I was right but still downvoted :/

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it -9 Vote: I do not like it

    Yaa thun is right can u say some strategies how to practice?

»
6 weeks ago, # |
  Vote: I like it +39 Vote: I do not like it

Firstly, don't force yourself into thinking what STL I need here. Let's say you design an algorithm. Say you need to perform $$$I$$$ insertions, $$$D$$$ deletions, $$$S$$$ searches, you get the idea. Now you know the time complexity of each operation. The time complexity of your code will be $$$O(IT_I(n) + DT_D(n) + ST_S(n))$$$, $$$T_D(x)$$$ stands for time complexity of deletion, and the rest are similarly defined. Now you can compute the time complexity based on what data structure you are using, and what is the time complexity for each operation. So you want the one that minimises the time complexity of $$$O(IT_I(n) + DT_D(n) + ST_S(n))$$$.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it -10 Vote: I do not like it

    You telling this to a newbie, he won't understand. Even I don't know what are you talking about.

    • »
      »
      »
      6 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yess U r right

    • »
      »
      »
      6 weeks ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      didn't he mentioned

      ""use effectively??""

      I mean if that's ur title I assume you really wanna know something and you mean it

      btw everule orz

»
6 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You can Look at these :

STL-1 Topcoder

STL-2 Topcoder

Few Basic Problems

Well, there's no need to worry so much, STL are just tools that You can use while Solving Problems. Think of an approach to a Problem and choose which data structure will best suit the constraints.

Learning STL is just learning their Syntax, time complexity, functioning. Its application will eventually come with Practice.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it -6 Vote: I do not like it

    Thanks bro!!I will use ur resource.

    • »
      »
      »
      6 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hi, you know i can tell about my strategy. Initially I was also confused. Then first, I saw the video of rachit jain-stl in 45 mins. After that , I mainly learnt stl by reading other's codes. So make that a habit of reading other's codes, codes of top participants, you shall see remarkable improvement..

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it