EDIT : I think Admin removed links to some external websites, please use Google.
A little bit about myself.
I am an electronics undergraduate from New Delhi, and I started programming at the end of my sophomore year, as electronics has a very limited career scope in my country, I decided to switch my field to CS. I am mostly self-taught.
When I began my journey on April 19, my knowledge was limited to writing Hello world program in C language and being in electronics, my coursework was hefty enough itself.
Now almost about 12 months later, I am currently working at a large telecom company as a software intern. There is nothing impressive in being an intern in a tech company, but every year many people with and without CS background start on their own to establish a career in tech.
Now, there is an ocean of information available on the web about how to crack the coding interview, but I got lost somewhere in it. I had to do it all myself, find the relevant material, practice the questions, study new concepts along with managing my coursework of electronics. I wished someone can tell me exactly what to study and where.
Hence, I have designed this guide using mine and my friend's experiences, who also happen to have a non-CS background.
I am no expert at this topic, but everyone can still benefit a lot from this guide.
It is my give back to the awesome community I have found here at LeetCode.
I have summarized the guide in tasks, and you can complete them in the time limit prescribed. Time limit is actually how long I took to complete these tasks, you may require less time as I was not studying it full time.
Task 1: Weapon of Choice (approx. 20 days)
To start with, you have to learn a programming language.
Think of it as your weapon of choice, with which you would slay the demons of interview questions.
There are many available choices in the market, most popular here on LeetCode are - C++/Java closely followed by Python and then other languages follow.
Most people of non-CS background start with Python, as it is the most popular option.
But I think it is a poor choice for your first language, as you can get away without knowing many important concepts like pointers, memory allocation, pass by value etc.
Hence my advice is to start with C++, as it is fast, it will be much simple to debug and you can easily learn almost any other language without much effort after C++.
I learnt C++ by this simple book that I found in my library - Let us C++
No need to buy it, you can use any good book you can find. If you prefer, you can also use these free online resources to learn C++.
But, just learning a programming language, although important, is not enough to get a job as a software developer, most companies have an interview process that tests a candidate on Data Structures and Algorithms along with fundamentals such as DBMS, OS and System Design. Along with that, you must also build your Resume, which is a document created by a person to present their background, skills, and accomplishments.
I have limited the scope of this article to Data structures and Algorithms which comprise around 80% of an interview for junior roles and a separate post would be covering later topics.
Task 2: Mastering the basics (approx. 40 days)
After you have selected your weapon of choice, and have learned how to use it, for the next forty days, we are going to learn the basics of solving questions.
Data structures and algorithms, which are vital for solving the programming questions, are bread and butter of any interview preparation.
Data structures you are going to need are -
An algorithmic paradigm is a framework which underlies the design of a class of algorithms.
(Don't worry if you did not understand the above statement, just note that you would be using these)
Imp. note - There are many more DS and Algo out there other than these like AVL trees, Rolling Hash etc, and you may find some of them in your interview also, but be assured chances of that happening is minuscule, and reward/effort ratio is very low, hence I advise you to skip them.
Although many resources can be used to learn the basic DSA, like CLRS, LeetCode Explore section etc. But if you ask me, to save your time and effort, just head over to Abdul Bari courses, and thank me later.
He is a person I can vouch for and his style of explaining is intuitive and lucid. Watch a few videos of him explaining algorithms on YouTube, to understand what I mean.
He has a paid Udemy course for data structures and a free YouTube playlist for algorithms. This course is the only paid thing I am going to recommend in this guide, just because it is so good.
You can check the algorithm section first by going to YouTube and typing Abdul Bari algorithms and find the playlist. (Sorry, could not add the link, as there was some problem with the alignment of video.)
After watching any video, implement the code in your local IDE or if you have not set it up yet, do not worry, you can implement code here as well - LeetCode Playground.
After watching 10-12 videos, you will realize the importance of data structures.
You can get the Udemy course of Abdul Bari here - Udemy Abdul Bari
If you are not able to buy, you can refer to any or all of these -
Now after you have completed all the important data structures and successfully implemented them on the playground or local IDE, go back and complete remaining YouTube videos of algorithms.
You would have known by now, that implementing data structures and operations like sorting is very time consuming. Fortunately for us, every language (except C maybe) has built-in features or libraries that you should learn to quickly do mundane tasks like sorting or defining stack and queue.
In C++, we have STL for these, which you can learn from here or here.
Task 3: Starting your practice (approx. 60 days)
Going back to our weapon analogy, you have successfully learned to use your weapon and also learnt the basic skills of a fight, but now is the time to get your hands dirty on some real opponents.
Before we start, I want you to understand that first few days are going to be full of struggle, it was surely for me, I sat for several hours on easy questions, scratching my hairs and wondering, why am I so dumb.
But it too shall pass, believe me, if you can get through the first few days, you have won half the battle.
Now, I want you to start by following this or any other roadmap for yourself. Solving questions haphazardly is not a good way to improve when you are starting.
I think LeetCode has all that you would require for practice, and you do not need to go anywhere else, but still, you can solve a few questions on HackerRank and HackerEarth to get accustomed to those platforms, as most companies use them for online coding round (at least in India).
On LeetCode you can select the tag of your choice and sort the questions by their acceptance rate as it reflects a much better grading of questions than just Easy, Medium or Hard. After that solve at least 15-20 questions in every section.
You should give every question a good try, which means uninterrupted attention for 45 minutes if you can find a probable solution, try to dry run it on a few test cases. Only after that touch your keyboard.
Make this a habit, believe me, you would be tempted to start typing, just so to start, but resist that urge and only type, when you fully understand your idea.
Also, always sit with a pen and paper ready, to enforce this habit.
If you cannot figure out a question, even after an hour of thinking, see the idea used by top rated posts on discussion, and then implement it yourself.
Road map to solving questions of different topics, can be done in any other order, but follow this one if you have none other.
Recursion -> Linked list -> Stack -> Queue -> Two pointers -> Sliding-window -> hashing -> sorting -> binary search -> trees -> BST -> Heaps -> Graph basics -> BFS -> DFS -> backtracking -> greedy -> Dynamic programming -> advanced graph -> Union find -> bit manipulation.Most people (including me) find DP a difficult topic, as some questions are not very intuitive. The only solution to it is practice. I have compiled a list of awesome resources at the bottom, so do not forget to check it out.
Task 4: Getting better (approx. 100 days)
If you have reached this level, you probably would not need my guidance any further.
Still, here are my 2 cents - Start solving without knowing the topic beforehand. Solve random questions and also take part in LeetCode contests. You can also start giving mock interviews on LeetCode.
If you still feel insecure about your DP skills, do not worry, just keep grinding, every day you will get better.
Some useful bookmarks that I have, check them out after you are done with above tasks.
Some interesting stuff
That's all for now, if you find any mistakes or broken links, please write in comments.
If you have read this far, please upvote.
Thanks!
If you have any interesting bookmarks that you would like to share, please write in comment, I will add it.
Here is a list of awesome resources I found in the comment section -