A Guide to Coding Placements

How to prepare for your placements, starting with DSA.

Shreyansh Chheda
Developer Students Club, VJTI
11 min readFeb 1, 2021

--

What to expect from this amazing blog? 😎

  • Language selection and learning tips.
  • How to build Logic.
  • Which sites and resources to use to learn DSA effectively.
  • How to learn? What methods and tips to follow?
  • Resources wherever specified which my colleagues also used to get placed.

Hi!😃
I would recommend reading the WHOLE blog once, and then implementing the steps sequentially. I can assure you that if you use these resources you will not get confused and will cover everything you need for programming and placements. This is Part-1 of a 3-part series covering everything for Placements, links at the bottom.

Too many cooks spoil the broth, so follow the advice of a few people after reviewing what everyone has to say.

I want to make it easy for you to jumpstart yourself into programming the right way following these steps:

You would have heard a lot about Competitive Coding and might be flustered by now, rest assured it’s to get beginner and intermediate coders into the practice of coding! 🎉

Proficiency in Data Structures and Algorithms(DSA) is not the same as Competitive Programming.

I had tonnes of problems while I was learning DSA😓; So I took a more methodological approach to learn as compared to my colleagues with raw talent (Amazon, Google, Chintu’s 150Cr package stories and guidelines never helped me 🙄). This is the methodology I wish to share with you in the form of a roadmap!

I had attempted a project before doing DSA and one after DSA. The efficiency of my projects was miles apart. It is recommended that you get an understanding of Data Structures and Algorithms before you jump into projects. This will also help you to get placed as questions asked to you are based on problem statements that you have to answer through DSA. Follow all the steps as mentioned in serial order, and you will very well feel confident in DSA henceforth :)

Langauge 🔡

A language is just a set of instructions that the computer will understand, some languages are very close to how you would talk e.g. — SQL, Python.

A language helps convert your logic into a structured set of instructions, everyone who understands the language, gets your logic.

It’s often said that coding languages are not only less complex than human languages but also more logical to understand.

You should know at least one object-oriented programming (OOP) language. An object-oriented language is a language that provides the Classes and Objects functionality. If this term seems foreign to you, don’t worry you will learn it in the language resources mentioned below.

C++👩‍💻

C++ is the most popular Competitive programming language. By this I mean to say that it’s widely used in the coding community for this purpose.

The reason this point is important is that while learning you will be learning from examples and solutions, to find the solution someone should have made it/formulated it which is very much possible in C++, with a majority of the people using it, you have a very high probability of finding the solution in this language.

With this for Data structures and algorithms, C++ provides an ever-resourceful and very powerful library called STL(The standard template library).
STL has many “containers” whose details you will understand in the resources mentioned below; this helps you to use various helpful inbuilt structures that will help you in making a very efficient and readable solution when used correctly. You are expected to be using these in your coding tests unless specified otherwise.

To Learn:
TheNewBoston (Language Basics)
TheCherno (Pointer and advanced topic, also for quick reference)

To Practice:
InterviewBit C++

Java☕

Java is the second most popular language. It is often used in MNCs and hence they do ask questions in it. The learning structure of Java is the same as C++ with the only difference being that instead of STL, you have the Collections Frameworks.

Java is very wordy in my opinion; it’s long and taxing to complete the syntax but can be considered very strong and secure in production environments. For coding tests where speed is your friend, it may not be the most recommended.

Many legacy systems and old coders work in java. They have written amazing code in it which is used in quite a few MNCs. For backward compatibility and clubbed with recent updates, it’s still a trendy language.

Knowing Java and its accompanying tools and frameworks (for UI, testing, Docs) you can opt to make some splendid projects in it if you choose to stick with only 1 programming language for the time being.

To Learn:
CodeWithHarry
New Boston

To Practice:
InterviewBit Java

Python (or pseudocode (☞ °ヮ°)☞ ) 🐍

Python, considered to be THE most popular coding language, because of how easy it is to code in it. It is not something I’ve personally used for Datastructures and Algorithms, nonetheless, I am quite experienced in it, because I’ve used it in tonnes of projects for the prototyping quality. I planned to get into machine learning which is made easier with python libraries

As for data structures, these are the resources I’ve found which can be used. One problem that could be faced is those very niche problems that are rather complex, may not be available in solutions, and hence wouldn’t be my first choice.

To Learn:
Python Language
Reference book
Python DataStructures

To Practice:
InterviewBit Python

⭐ My choice considering the above points for DSA was C++ because all solutions are freely available. The way to go to learn languages would be to learn a section of the theory and practice it in the InterviewBit link provided above.

LOGIC👨‍💻

You can learn the syntax sugar of as many languages as you want, but the skill of problem-solving, followed by using the code structures in a language is the core skill of a programmer on which he will be judged.

While learning about the language, it is always helpful to explore what you have learned with very basic questions.
Eg — you learn if-else, for loops, switch statements, OOPs, etc.

⭐ PRACTICE!
It will help to reinforce your knowledge and give you a working understanding of code. Learn while you practice so that you can build basic logic. Your brain takes time to get accustomed to something new.🧠

“Think like a programmer” (Watch the first 16 videos relevant to you, then cover the rest as you see fit.)

A coder is a problem solver, he can see a real-world problem, formulate an algorithm to solve it, and translate the algorithm into code (a fairly easy step as it is learned through practice. As mentioned before, most coding languages are very logical, and they are also easy to learn once you get the hang of at least 1 language).

Let’s take an example of solving “add the first 10 natural numbers”, the brute-force solution that someone would come up with could be this:

Seems to do the job but what is I now want to add numbers 1 through 100000000?

If we say that a computer can solve 1⁰⁷ calculations per second, this would still take 10 seconds. We don’t wait 2 seconds to load a webpage, I’m sure this isn’t the best way to solve it, so is there another?

Gauss Equation
Summation equation

So in just 3–4 calculations, we were able to get the correct answer. This is the skill one must inculcate, to start at a brute-force solution and move to something more efficient.

If We Talk About Efficiency We Think Of It In 2 Aspects:

•Space complexity (memory)
•Time Complexity (time to calculate results)

Time complexity helps to generalize the time that would be required for all problems built a certain way. Eg — linear time complexities O(n) will linearly increase in time with bigger inputs. Quadratic O(n²) and Higher polynomial O(n^p) Time Complexities will grow even more for bigger inputs, with the worst being exponential O(p^n). Our goal would obviously be to bring this down as far as possible for a given problem type the irony being that usually, this makes the code more complex :p.

We call this the space-time tradeoff, usually, a more time-efficient solution will require more memory (RAM) while solving. In the current era, we do have more memory to play with, and hence we try to optimize time efficiency to the maximum possible extent. This is also a research topic and it’s a fundamental problem of algorithms.

Now that we are done learning a language to quite a good depth, let’s get into some libraries!

STL/Collections

A straightforward example would be that if you had the same type of plates, it makes sense to store them in a cupboard one on top of another(stack).
But if you had 5 different types of colored dishes you’d prefer to keep it accessible either directly (hashtable) or sequentially (list, array).

This intuition should help you along even while solving problems as to how to best save the data in memory units so that you can use it accordingly.

The resources for the same are here:

To Learn:
Bo Qian — (C++ STL)
Java Collections
Python Data Structures

Sagar Udasi’s book (Theory and exhaustive collection of problems that use STL to solve DSA based problems)

To Practice:
C++ STL
Java Collections
Python DS

This Seems Overwhelming!🤯

tr

Tips:
⭐ You will get overwhelmed if you do a lot at once, it’s essential to take it in small bytes. Learn every day consistently, the quality of what you learn matters more than the quantity.
❌ I’ll solve n problems today.
✅ I’ll learn a new topic today.

⭐ Find a friend or a small group of friends who are undertaking this coding journey with you. Keep a tab on each other, (I’d say 2 as a pair is enough and easier)

⭐ Maintain an excel sheet of problems you solved, you can add personal comments of what you learned and/or what you wish to remember going forward so that you can make use of it again.

Example of Google Sheets

⭐ Learn first, Practice while allowing yourself to look at the solution in the beginning, but later do remember to try a similar question without looking at the solution.

SPOJ

The top 60 most solved problems are easy and help with basic problem-solving ability.
It will help you get the hang of formulating solutions and converting them into code. You can start using STL from here.

This will make you use a few of the STL classes you learned about.

SPOJ top 60 most solved problems⭐A tip: use the excel sheet from this point onwards, or if you wish, do it right from the basic questions, follow what is easier for you, the goal is to learn and remember what you learned so that you can apply it.

Not Competitive Coding

📍 A coder’s strength is being able to take real-world problems, apply an algorithm to solve the said problem, then convert the algorithm logic to code.

We code towards automation and ease of use. Together with code, we can create systems that serve amazing purposes.

This is something a coder is judged upon, and we can argue that. This is the reason you hear competitive programming so much.

💁‍♂️ Proficiency in Data Structures and Algorithms is not Competitive programming.
Competitive Coding is a hobby, DSA is a necessity.
There is a level that divides the two, you can decide for yourself if you wish to do Competitive Coding.
InterviewBit.com
mentioned below will take you through the most important topics of DSA.
For Competitive Coding, you can explore Complex Data Structures and Algorithms by yourself through contests, online articles, and more.

I used InterviewBit.com for learning purposes because in a very systematic way they showed what to solve with an easy UI, good problems, hints, and solutions (for free, unlike some other websites).
I would suggest Learning a topic, then Attacking problems of that topic and once you are done, you Move forward.

  • Easy to follow Roadmap
  • Helps to learn each topic and all the question types that are generally asked in coding tests and interviews exhaustively.
  • The site I recommend you use while learning and practicing DSA.

Learn a Language on InterviewBit
Learn and practice DSA systematically on InterviewBit

Data Structures And Algorithms Resources 💰

Learn as you go one topic/data Structure at a time. Don’t take it all at once; learn a topic with a simple google search as it’s relatively easy. Visualizations and animations will help you understand code, algorithms, and data structures better.

Resources for DSA
Jenny’s Tutorials for Datastructures and Algorithm
Algorithms by Abdul Bari

Books I referred to for Placements

These two topics are generally difficult to understand the first time. After reviewing a lot of resources, I have found these playlists to be the most helpful till date:
Aditya Verma Recursion
Aditya Verma Dynamic programming

Don’t worry about trying multiple resources, this list is just to show you what a good playlist could look like.

Solving on more sites!

You will learn more when you solve more problems of varying difficulties from Competitive Coding websites.

I would recommend you try your hand on not more than 2 Competitive Coding sites.

GeeksForGeeks.com — A common Hub for everything related to Software Engineering, Also includes most asked questions, MCQs, Placement stories, and archives.

Hackerearth.com — Platform used by a few companies
Hackerrank.com — Platform used by a few companies
Leetcode.com — Another popular CP site, good for contests and learning
Leetfree.com — Free version of leetcode
CodeForces.com — Good for problem rankings
Codechef.com — Good for competitions

Concluding,

The road to DSA takes time, energy, and resilience. You need to solve consistently. Use the excel sheet example mentioned above to log whatever you have learned; It will help you with revisions.

🌟 P.S. — Super pro tip: If you’re facing a problem, sleep it off, the solution will come to you automatically ;P.

Do not hesitate to contact me with doubts.
You can reach me through LinkedIn or by mail.

shreyansh.chheda@gmail.com

The next part of this series deals with Projects, following which we will deal with interviews!

Do send some applause👏 , comment on your reviews, and do share the post with your colleagues if you found it insightful.

--

--