Code Monkey home page Code Monkey logo

preparation's Introduction

Preparation Guide

Table of Contents

Trust me, This won't be boring.


Why?

In every developer's life, there comes a point when they have to learn Data Structures and Algorithms. Whether it is for coursework, or getting an internship, or a $$$$$ job, these two topics serve as the basis for everything. I started learning these to get a nice internship, but ended up loving solving problems.

Don't do Algorithms because you have to do it, Do it because you want to do it.

This repo intends on converting that have to want. Let's get started!


How should I use this repo?

You will find several folders in this repo. Each folder represents an important topic in Data Structures and Algorithms and contains a list of important questions in that topic, along with the methods in which one could solve it (basically thought process involved while solving a problem).

If you are a newbie and want to learn DS & Algos, I would suggest you CLONE the repo, and start following the timeline! You will end up learning a lot and strengthen your knowledge in the DS and Algo domain.

If you are an active coder? Feel free to pick a random folder and test your skills! It will be fun.


The Timeline

To cover all the important concepts of Data Structures and Algorithms in an ordered and timely manner, I am following the following timeline -

  • Week 1: Understanding complexity (Time & Space) & The Basics
  • Week 2: Sorting Algorithms
  • Week 3: Linked Lists
  • Week 4: Stacks and Queues
  • Week 5: Trees
  • Week 6: Graphs
  • Week 7: Misc

I will be pushing code and updating the repo regularly and will keep on updating the list.


Understanding Bits and Bytes

Everyone has their style in which they analyse and solve a problem. Here's my approach towards solving problems (it works like a charm!)

Step 1

  • Read the Question.

    Write a program to reverse the words in a string.

  • Reframe the question in your own words.

    • I need to reverse every word in the string. Perfect.

Step 2

  • Ask Questions? Clarify everything about the question before you move further.

    • Do I have to reverse the order of the words in the string? Or only the words? => Questions like this.
  • Think of the possible test cases. Just try your best.

    • Single-word? Empty String?? A string of characters???
    • Remember that no one is perfect. Questions are designed to trick you and so yeah, in the first iteration you will miss some test cases but you will have covered 80-90% of the test cases! Congratulations!

Step 3

  • Start coding

    • Once you have figured out the test cases, think of pseudocode which considers the test cases and then start coding the solution.
  • ๐Ÿ”ƒRepeat Step 2

    • Once you run your code, there is a chance (a very high chance) that you might have missed a few test cases. Trust me, this is normal. All you have to do is to try incorporating those test cases with your code and follow the steps until unless you pass all the test cases. Simple eh?

When we start coding for the first time and try solving a problem, you will learn that Brute Force is not the only way to solve a problem. Take the problem when we have to find a number in an array? A first timer's approach will be starting from the first element and then iterate over the array searching for the element (O(n) solution). Later on, you will learn that this can be done in a much efficient way using Binary Search. All you have to do is be open to learning new things and try incorporating them in your future code ( as per the need).


Goals

Here are somethings which you can try to get started

Given that you are still reading means that you are serious about it and really want to get started. Perfect! Here are some things which i tried out and they turned out to be really helpful!

  • Solve 3 questions per day

    • Simple right?
  • Reward yourself!

    • Snapchat lover? (snap streaks). Start making a streak of the number of days you consecutively code. Reward yourself when you reach your goals. Like in my case, what I did was pretty simple.

Solve 3 problems per day. If done, I used to transfer $3 into my friends' account. At the end of the month, you will have your pocket money.

  • Just find your perfect mix!

  • Start Using Trello

    • Heard of Trello? If not, here is the - link. I used two separate boards in trello. One was where I added the questions that I was solving along with the difficulties I faced. And the other to maintain my weekly progress. I have added the two boards in the resources section. Do check those out and feel free to modify them as per your need! Trello works like Magic!

Resources

I was confused, very very confused about what should I refer to start my preparation. Thing was, I wanted to try and cover as many problems as I can. You never know what might happen tomorrow! What if the stacks question that you skipped while practice was asked to you in your Facebook Interview and you don't know how to solve it. Like every other student/programmer, I was greedy and wanted it all.

Here is a list of materials which I referred and covered the important concepts of Data Structures and Algorithms -

  • Data Structures and Algorithms Made Easy: Data Structure and Algorithmic Puzzles, Second Edition a.k.a The Yellow Book

    • This book is gold! I followed the timeline from this book and solved the examples given. It's amazing.
  • While solving the problems from the yellow book. Do checkout Geek For Geeks

    • Do not get swayed by the number and variety of problems in Geeks For Geeks and just focus on learning and implementing the optimal solution for the problem stated :P
  • I would suggest if you have time, start reading the Bible of Algorithms a.k.a C.L.R.S

    • This is a very complicated book. But. Once you start reading and understanding the algorithmic approach given here? You will love it. It keeps on getting better.
  • Once you are all set with the concepts and The Yellow Book. Switch to Leetcode and Hackerrank Interview Preparation Kit and be prepared to be surprised by how easily you will be solving the problems in these websites.

Solving a large number of questions will not take you anywhere, understanding and learning the concepts will help you in the long run!


Contribute

Liked the project? Want to contribute? Here's how you can get started - Contribute


Stalk me

Reach out to me at one of the following places!

preparation's People

Contributors

lutir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

deepika1520

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.