Skip to main content

Posts

Showing posts with the label coding made easy

C++ STL (Containers) Tutorial For Beginners Learn STL Hacks Part -1

So, As I said that I will be writing in the next post about STL hacks and tricks so here I am with this post. /* Important Note : STL: Standard Library  ( To Import It Use: #include<bits/stdc++.h> ) Container types (and algorithms, functors, and all STL as well) are defined not in the global namespace, but in a special namespace called “std.”  Add the following line after your includes and before the code begin: using namespace std; otherwise use:  std::'container' */ You must have g++ compiler installed on your PC for using it. STL is mostly used by intermediate users of C++ and it is quite helpful in Competitive Coding, it saves a lot of time and all the algorithms are implemented with the best possible Time and Space Complexities available. STL is quite vast and we'll be step by step covering all of it, this post is a brief intro of : Containers   Vector  Pairs  Iterators      Set CONTAINERS In n...

How To Learn Any Programming Language Easily

Coding is not a Rocket Science which you'll find difficult to understand, it's simply like learning a new language to speak. First, you need to understand the alphabet (for example a-z / A-Z ).  Second, you need to learn some basic words and their meanings. Third, Try to form sentences by combining those words. Fourth, Repeat Steps Second & Third with a new set of words. Fifth, Practice and Practice until you are comfortable with it. The above-mentioned steps are nothing but an algorithm. An algorithm is a procedure that includes certain steps that help us to achieve the desired goal. Above mentioned algorithm for a programming language can be written as : First, you need to understand the alphabet supported by a language (for example ASCII ).  Second, you need to understand what are it's keywords i.e. words with a pre-defined meaning. ( for example string, char, int, main, long, double, cout, cin, typedef, etc.) Third, try to form meaning full state...