1
$\begingroup$

So I'm a newbie to c++. I know the basic concepts of c++ as I have already learnt c language. For competitive programming DSA is very important. But I don't know any STL functions.

Is it possible to learn DSA without knowing STL? Which one is advisory to learn first(STL or DSA) so that it will be easy further?

Also suggest some good references for both stl and dsa.

$\endgroup$
4
  • 1
    $\begingroup$ Data structures and algorithms is a mostly theoretical subject, while the STL is the practical implementation of some useful functions. I don't think that learning any one of them is a requirement before the other. Also, I don't think that learning one will help you understand the other one... $\endgroup$
    – nir shahar
    Mar 27 at 12:36
  • $\begingroup$ However, it wouldn't hurt to learn DSA first and then STL $\endgroup$
    – nir shahar
    Mar 27 at 12:37
  • $\begingroup$ @nirshahar can you also suggest some best resources to study both of them $\endgroup$
    – Anonymous
    Mar 27 at 12:45
  • 1
    $\begingroup$ What is DSA? That is not a standard acronym. Please define all acronyms at their first use. $\endgroup$
    – D.W.
    Mar 27 at 19:38
1
$\begingroup$

I think STL (assuming you mean C++ standard template library) is something you sort of learn as you use it. Exposure to DSA (data structures and algorithms) is essential for solving new problems or progressing in CS. Since you are just starting out and partial to C++, any DSA textbook in C++ will be a good reference. Just try to Google search “Data Structures and Algorithms C++,” maybe with your preferred file type.

$\endgroup$
0
1
$\begingroup$

Data structures and algorithms existed before any particular implementation, and they continue to exist independently of any particular implementation, such as the C++ STL.

You can study data structures from several points of view:

  • What are the main data structures, what are their properties, and in what circumstances each of them is typically used.
  • How these data structures are implemented, and why they satisfy the stated properties.
  • Limits on data structures.

As a user of data structures, you are mostly interested in the first point. Introductory courses on data structures typically contain a mix of the first two points, with perhaps a sprinkling of the third one (lower bound on comparison-based sorting).

As a programmer, you also need to be aware of software libraries implementing various data structures, but this should be easy to pick up if you understand the underlying data structures themselves.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.