Skip to main content

Posts

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

In continuation of my STL tutorial series, I'll be introducing to some more STL containers in this post. The containers I shall be covering include: CONTAINERS String Streams Map Multiset Priority Queue String Streams Stringstream is the processing of input/output strings. The stringstream class in C++ allows a string object to be treated as a stream. It is used to operate on strings. By treating the strings as streams we can perform extraction and insertion operation from/to string just like cin and cout streams. C++ provides two interesting objects for it: ‘istringstream’ (input stringstream ) and ‘ostringstream’ (output stringstream). Both of these are declared in #include< stream >. Object istringstream allows you to read from a string like you do from standard input. The ostringstream object is used to do formatting output. Insertion And Extraction Operations Using stringstream Insertion (i) Using Insertion Operator (<<) Data i...

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...

Top 5 Career Opportunities In Computer Science After Bachelor's Degree With Required Skill Set

If you're a Computer Science / IT student or are planning to go further in it then this post is for you : Well Computer Science has a lot of lucrative career options available and today I'm going to talk about : The Top 5 Career Opportunities you can look forward to your Bachelor's In Computer Science 1. Software Developer Engineer / Software Engineer:  Details Software engi neering is one of the fastest-growing specialty fields in the world. Most experienced software engineers make over six figures and enjoy great perks, such as being able to work remotely from home or while traveling. Software engineers create software and systems for computers. They employ math, science, engineering, and design techniques to build these systems. Additionally, they must be able to test and evaluate their own systems of software built by other engineers. Skill Set Software engineers usually have a degree in computer science. They should have strong analytical and problem-solvi...

What is the work of IT industries in the world?

Ever wondered what will be the use of skills that we learn in our school/ college? What is the work of IT industries in the world? If Yes, then this post is for you all..!!! Before learning anything you must first know what is the practical application of what you are learning. Interviewers while taking interviews don't expect you to know all the tools that they use, but instead, they see how eagerly you accept things and how fast you can grab the concepts.  And the skills you know are an indication that you've spent time on yourself in learning those skills and in the future also if the company asks you to learn a new skill you'll easily adapt. In short, they look for someone ready to learn. As once you get into the industry first they'll make you learn certain skills and at times unlearn certain skills that are not required. An internship is a period in which this learning and unlearning of skills take place. Getting back to question:  What is the wor...

Coding and Mathematics ( Importance Of Maths In Programming )

Everyone wants to become a good coder but only a few manage to achieve this you know why? BECAUSE everyone wants to code and no one really wants to be a good mathematician which is the basic requirement to be a coder, yet very few know this fact and try to be a  mathematician first than a coder. What exactly is coding? It is the process of solving different technical problems using a programming language. The technical problems can vary from printing a  simple "Hello World" program to solving "2 SAT Problem" using mathematics. You might today be able to solve a few problems using your technical skills but it would help you in the long run only if you're fundamentals of mathematics are also clear. By mathematics, I don't mean the whole of it but some important topics such as Discrete Math, Algebra, Number Theory, etc. Here are some concepts of mathematics that you will use mostly in solving the technical problems : Fundamentals B...

The Best Programming Language To Learn

In this world of technology, everyone wants to have a secure career. All the aspirants are driven  through  trending languages that are coming in the market such as Python, Ruby, Scala, etc. I'm not writing this blog to stop anyone from programming in Python etc. but I'm going to share with you all the  ultimate  truth of the industry. If you're a Computer Science student and will be appearing for an interview at placements then you' ll be judged  on your various skills. Modern languages such as Python, Scala, etc. all have inbuilt functions and a lot of data abstraction is present there. When you're in an interview then you' ll be judged  upon your  proficiency  in a language and how clear your logics are that is also checked there. So, there you  are asked  to  write down  a code and this is important as this will show the interviewer how capable you are. For example : A question on sorting is asked so in Python you ca...