Saturday 30 June 2018

My Interview Video Link

Felicitation Program Interview:
https://www.youtube.com/watch?v=Gu3IJ8-Cleo

Highlights Of Felicitation Program can be found at:
https://www.youtube.com/watch?v=MuA68g1SyCM&t=15s


Frequently Asked Questions (FAQ's)

Qn 1) Can u share your notes ?



Ans: Sorry i don't have that much time to upload and share my notes. But you can always refer this link:
https://gatepoint.org/ravindrababu-ravula-eclasses-external-pdf-notes-open-resource/.



Qn 2) I want to prepare for gate. So it would be really helpful if you can lend me ravindra sir's videos



Ans: Sorry i don't believe in cheating. you can prepare from standard text books if you can't afford ravindra sirs videos. Refer my blog's resources and books section for more details.



Qn 3) Where did you took admission ?



Ans: IITD



Qn 4) I want to ask that if CLRS book is recommended for data structures and algo?



Ans: Even we will read that in mtech 1st sem...Haha



Qn 5)  I want to know that I am an average coder so is it advisable that I should prepare for gate... as I dont see any other option besides that...



Ans: ave u seen gate 2018 paper? Go through it first and see the c program qns asked. see if u can tackle them with your avg coding skills if not then don't waste your time in gate.



Qn 6) The thing is that I had the doubt that currently I am not able to code in a good manner... would I be able to cope up when I go for the college in m.tech... and if not then also I would have less chances of placements just like in btech



Ans: stop looking for advices and answers from others...talk to the inner you... else you would miss talking with one of the best persons of the world....

coding is my weakness..ok then i wl gv 1hr a day towards coding and till gate i wl be reaching certain level...

this is how its done...



Qn 7) Can i ask you gate related questions ?



Ans: please dont send me qns...i m busy with my forthcoming course work at iitd. post it in GO group. if i get time i will answer ... there is so much things to learn after gate.



Qn 8) learning 1 lang for competive programming is fine ryt ? suppose i learn java ..i should practise ds and algo using java ryt ?



Ans: obvio
python is cool also... u hv to write very less amount of code in python
in java a bit more...
both are interpreted languages...so both are  good



Qn 9) what was the last rank/cutoff in ittb (gen) ?



Ans: 86



Qn 10) Could u kindly tell me the placement scenario in past 2 years at IITs mtech cs and are all of them for SDE roles ?

or do companies with data scientist/analyst also come to hold campus interviews at mtech IITs ?

Ans: IIT's placements are beyond your imagination...the top 5 iits have just awesome placement.... IITD itself has starting package of 20lpa...
job profile varies from company to company....

Qn 11) are you in ML specialization ?

Ans: specialization is optional...
you have to study really hard course work and sidewise do TA work also...so if you feel u can do, then one shud go for specialization...but it doesnt matter in placements.
machine learning u cant opt to study as a course subject...your grades would justify your knowledge in that...

Qn 12) For Os Galvin is enough?

Ans: you are giving gate exams...not your university exams
it's not that u read and mug from one book and its enough
clear ur concepts
practice a lot of questions from all possible sources.

Qn 13) How was Gateforum Subject test ?

Ans: haven't given it.
so can't say,
only full length of gate forum i gave
pretty easy direct qn's to boost your confidence.

Qn 14) Bhaia December me semester exam hoti h us wkt kaise krenge. ...

Ans: exams ke bich ke breaks mein adjust karna thoda aur kya...

Qn 15)Do you know from where can I get correct solutions of exercises of standard books?

Ans: galvin its available online
rest others hard to find
u can purchase solution manuals from book stores

Qn 16) Do you prepare from text books or any coaching?

Ans: I have used all sources..because i had less time...i took rbr sirs online classes..then all standard text books and finally all test series..In case of doubt i referred GO answers. The best !!!


Qn 17)
But my question is what do you think , were your mistakes, if not committed, could have get you more marks.?

Ans: i feared a bit... during jee mains i got so many negatives that my nit seat was lost... So this time in gate i calculated my marks during exam... it was around 70...so i was confident that i am getting a seat in iit...so no need to take unnecessary risk and loose it this time...
but later i found that i could have scored a lot more...4 questions i left unattempted whose answers that i calculated were correct...😅... but doesn't matter..in real gate with so much of pressure it is not wise to take such risk...1 mark might get you from iit to nit...very risky !!!

Qn 18) It would be my privilege to know the kind of risks you took during preparation.

Ans: not siting in placements....studying 1 day before sem exams.... bunking all classes....not talking with friends much....no movie... no facebook and whatsapp in last 3 months...not giving mid sem exams as it was on jan 31st...gate was on feb 4


Monday 25 June 2018

Things to do post GATE

Just after completion of the GATE exams you would be getting a lot of free time. You will be getting bored to avail so much of free time. So i am mentioning few things that i did. Just don't sit idle !!!

1. Learn Car Driving
Any local car driving training institute would be fine. It would take max 15 days to learn.

2. Join Gym or exercise daily for 30 mins and evening or morning walk 30 mins.
Health is important, so just don't ignore it.

3. Create your own blog
You can use blogger.com for this. It's pretty good.

4. Interact with last 2 year seniors of the institute you are planning to join, ask you queries about courses offered, placements, campus life, things to do and not to do, about faculties etc etc.

5. Learn Machine learning from coursera. Daily watch few videos. You would be a pro in ML till you join the IIT's or IISc...It would help there.
Link: https://www.coursera.org/learn/machine-learning

6. Learn Python from codeacademy, and other data science stuffs.
Link:
https://www.codecademy.com/learn/learn-python
https://www.codecademy.com/beta-catalog/subject/data-science

7. Go out with friends for a trip.
Don't ignore your friends. They are a part of your life too.

8. Prepare a complete GATE type question paper consisting of 65 question to help future aspirants. You can host them at gateoverflow or any other. Just 1 full length test. It's really difficult so don't think of preparing more than 1 full length test.

9. Watch series. My all time favourite is GAME OF THRONES !!! HaHa.... Others include FRIENDS, SHERLOCK HOLMES etc. Just get a free 1 month NETFLIX subscription and browse through different videos.

10. Think about your future and how you want to take your life after this. If any start up idea you have then try to plot the road map, write your ideas somewhere..think think and just think a bit...

Good Luck....!!!

An idle mind is a devil's workshop. So never sit idle !!!

Competitive Programming - The path you always hesitated to take

You can follow this https://iamruturaj.blogspot.com/2020/05/interview-preparation-guide-must-do.html for better guide towards interview oriented competitve programming. 

Do read this post as a reference.

Just like you all, i feared every time i heard the name "COMPETITIVE PROGRAMMING". During my B.Tech 1st year i struggled even to write a program to print patterns on the screen. Pointers in C programming were the worst nightmares for me..HAHA !!!...

Then in 3rd semester, C++ came into picture. It was the same old story as C Programming with added terrors like copy constructors, friend function, templates etc etc.....

Finally in 4th semester, JAVA the saviour came into my life. No more pointers, No more syntax's to mug up, No more memory allocation (calloc, malloc, freealloc)....

SO HERE COMES THE FIRST THING. YOU NEED TO CHOOSE A LANGUAGE FIRST THAT COMFORTS YOU THE MOST.

If you are good in C or C++ or Python or Java then just go for it. If you are not sure and a beginner then i would recommend you to go for JAVA or Python. Programming in C will make your life to hell in competitive programming. So i won't suggest it because there are no well build libraries in C. 

Here i am mentioning few good resources but you can google for more also,

Programming in C:-
https://www.amazon.in/Programming-C-Reema-Thareja/dp/0198070047
http://www.dipmat.univpm.it/~demeio/public/the_c_programming_language_2.pdf
https://www.javatpoint.com/c-programming-language-tutorial

Programming in C++:-

JAVA:

Python:

DO NOT LEARN EVERYTHING AT FIRST. JUST THE FOLLOWING THINGS YOU SHOULD LEARN. 

1. Basic input and output syntax (print statements and taking input from user)
2. looping constructs (for, while, do while)
3. If-Else conditionals
4. List (Stack, queues, deques)
5. Map
6. Recursion and function calls
7. Constructors and class definition
8. Math Library Functions
9. Sorting and Searching (inbuilt functions)
10. Some shortcuts ( you will develop this gradually by yourself)

IT WOULD TAKE 10 TO 25 DAYS TO LEARN A LANGUAGE PROPERLY DEPENDING UPON INDIVIDUALS GRASPING POWERS.

NOW LET'S TAKE A STEP INSIDE THE WORLD OF COMPETITiVE PROGRAMMING,

Fix this in your mind that it is a very slow process to be a competitive programmer. It took be 11 months to reach a standard level of competitive programmer. So you might take even more depending on your grasping and understanding power. 8 to 12 months would be the general range though. There might be days in which you are stuck in solving a simple problem. No worries !!! Just keep going...Don't give up midway...

IMPORTANT RULE: 
If you are ever stuck in a single problem for a long period of time. Just leave it. Take a break. Do some other problems or relax. After a while you would find the logic...

Now question is from where should you start !!!!

LEARNING DATA STRUCTURES IS THE FIRST MOST IMPORTANT THING.

Data structures are the foundation pillars of competitive programming. Don't jump direct into algorithms.

Master the following data structures first:-
1. Array
2. Stacks
3. Queues
4. Heaps (Max and Min heap), Priority Queue
5. HashMap or Dictionaries(in Python)
6. Graph implementation basics (BFS and DFS)
7. Disjoint Sets
8. Segment Tree / Fenwick Tree
  
Mastering means you should read the concepts first, see how it is implemented and then solve 5 problems on that topic without looking at the solution.


Just go through the topics i have mentioned above. Leave the rest that are present in the website.

NOW IN THE NEXT STEP YOU ARE SUPPOSED TO INTRODUCE YOURSELF TO FEW SIMPLE ALGORTIHMS:-

1. Binary Search
2. Merge Sort
3. Prims or Krushkal, any one 
4. Djikstra (the night-mare, haha!!!)
5. BFS and DFS
6. REGEX matching

Just learn how they work first. Many programmers forget how to implement very often. But if you remember how they work. Slowly you can write them on your own. But a beginner just learn how they operate. You can always copy code from google initially.


Now after you have done this. TIME FOR THE LAST STEP. 
THAT'S PRACTICE.


Complete the above series religiously. You will learn everything gradually. Solve 5-6 problems from each topic and move to next topic. 

THEN COMES THE CHALLENGING PART. NOW YOU NEED TO EXPLORE REAL WORLD CODING QUESTIONS AND EXPERIENCE.


Solve all the problems in the above link. 

After this no one can stop you !!!.... 

If you have reached till this point then you have already reached a standard level

These are few contests that i have hosted at hacker-rank in past. Do solve them. Editorials are also there. You will learn how "Hackerrank" differs from "codechef". Every platform has it's own set of interface. But if your foundation is strong then you will survive in any platform.

Links:-

AFTER THIS, YOU ARE THE KING OF YOUR REGION. JUST EXPLORE THE WORLD...

Challenging problems can be found out at:-

(Do check how to submit in codeforces first. it's bit different than other platforms. google it !!!)







WORLD FAMOUS CONTESTS THAT YOU CAN TAKE PART IN AND AVAIL CASH PRIZES AND JOB OFFERS ( Just google about them)

1. GOOGLE CODE JAM
2. FACEBOOK HACKER CUP
3. ACM ICPC 
4. CODENATION HACKERRANK
5. CODECHEF SNACK DOWN
6. CSI, COMPUTER SOCIETY OF INDIA PROGRAMMING CONTEST
7. TCS CODEVITTA

POPULAR INTERVIEW QUESTIONS OF COMPANIES CAN BE FOUND OUT AT:

https://iamruturaj.blogspot.com/2020/05/interview-preparation-guide-must-do.html


REFERENCE BOOK FOR COMPETITIVE PROGRAMMING:-


FOLLOW ME ON:



JUST GO OUT THERE AND EXPLORE ALL THE POSSIBILITIES. DON'T LEAVE MIDWAY !!! YOU ARE ALMOST THERE ...

GOOD LUCK...







Monday 11 June 2018

Array indexing Row and Column major order

You just need to remember 2 formula's then you can easily solve any type of problems related to this. I found out from a source while i was preparing for gate. It also helped me solve interview questions asked at iit delhi.


Column Major -> (n+ N1(n2 + N2(n3 + …..)))


     Row Major -> (n+ Nd(nd-1 + Nd-1(nd-2 + …..)))

You can solve any dimension (1D, 2D, 3D,...) problem using the above formula.
................................

Lets solve a 2D array problem now.

Q. A is an array [1...10, 1....15] or [1...10][1...15] of elements. The

 starting location is 100. The location of an element A[i,j] or A[i][j]

 using row major order is? 

or, lets see the same question in a different tone...

Q. Let A be an array.

int A[][] = new int[10][15];

starting location of array is 100. Index starts from A[1][1].

The location of element A[i][j] using row major order is?

Answer:

Look at the formula for row major order:


(n+ Nd(nd-1 + Nd-1(nd-2 + …..)))

here as only 2 dimensions are there (2D array) our formula reduces to

(n2 + N2(n1))

Total number of elements present in 2nd dimension. 

N2 = 15 -1 + 1 = 15

Here we don't need N1 as in formula N1 doesn't exist.

Still if you like to calculate, N1= 10 -1 +1 = 10

A[i][j] location is asked so n1=i, n2=j

Don't forget to subtract 1 from n1 and n2 as our starting index is

 from A[1][1] not A[0][0]. 

Putting the above values in formula we have,

((j-1) + 15(i-1))

= 15i + j -16

Assuming size of int to be 1 Byte.

base address given = 100

Location of A[i][j] = base address + size*(value we calculated)

= 100 + 1(15i + j -16)

= 15i + j + 84



.................................
Lets solve a 3D array problem now.

Q. A is an array [2...6, 2....8, 2....10] of elements. The starting location
 is 500. The location of an element A[5,5,5] using column major order 
is?

or, lets see the same question in a different tone...

Q. Let A be an array.
int A[][][] = new int[6][8][10];
starting location of array is 500. Index starts from A[2][2][2].
The location of element A[5][5][5] using column major order is?


Answer:

See the column major order formula.

(n+ N1(n2 + N2(n3 + …..)))

Now just calculate the total number of elements present in each 
dimension, i.e. N1, N2 and N3 as 3 dimension array is considered.

N = 6 - 2 +1 = 5

N2  = 8 - 2 +1 = 7

N3  = 10 - 2 +1 = 9

Location of element A[5][5][5] is asked so n1=5, n2=5 and n3=5.

Don't forget to subtract 2 from n1, n2 and n3 because our starting
 location is from A[2][2][2] not A[0][0][0].

Putting the above things in formula.

((5-2) + 5((5-2) + 7(5-2))

= 123

Let size of int be 1Byte.

Exact location address of A[5,5,5] = base address + size*(value we
 just calculated)

= 500 + 1*(123)

= 623


Saturday 9 June 2018

Interview Experience at IIT Delhi

I had odd application number, so my interview was scheduled on odd date, i.e. 23rd of may. I stayed at one of my friends (Hemant, AIR-94) place. The climate of Delhi was like hell. So hot that i felt like being cooked inside an oven. I roamed all places of delhi, explored the metro, visited iit delhi just one day before the interview, so that i don't get messed up on the day of the interview, It's important to do so.

On the very day of interview around 50 students (out of total 100 called for the interview on 23rd) were present. We had a 15mins introduction about the procedure and norms. We were then assigned different rooms and waiting halls. Then the interview started at around 10:30am. There were several panels each consisting of 2 to 3 professors. I was called upon at around 11:30am.

The interview went like this:

Ma'am: So Ruturaj, you are a recent graduate, you got a rank of 105, are your final semesters results out?

Me: No Ma'am, not yet.

Ma'am: Ok So tell me what do you mean by Query Optimization?

Me: In case of segment trees, whenever there is a query, we don't immediately propagate the changes to the leaf nodes by using the technique of lazy propagation, so this is an example of query optimization.

Ma'am: Sorry ruturaj, I was asking about DBMS query optimization. You remember about DBMS right?

Me: Yes Ma'am but it was taught in 3rd semester, so bit hard to recall. (After thinking for a while...) No Ma'am i don't remember.

Ma'am: Ok. Sir you may ask your questions.

Sir: So ruturaj are you good at programming?

Me: Yes Sir, i am a competitive programmer.(Now i cheered up as it was my field)

Sir: Which is better row major or column major order?

Me: Row major order i guess.

Sir: Why?

Me: after thinking for a while. Sorry sir it is actually code dependent.

Sir: Can you write the code to initialize a single dimensional array with 0.

Me: sure sir. i wrote it immediately.

Sir: Explain how row major and column major ordering works.

Me: I explained them with a simple example.

Sir: In a 2D array how row major and column major work?

Me: Explained them again with an example.

Sir: What is locality of reference?

Me: Said the answer and quoted an example.

Sir: Ok Ma'am now you can ask.

Ma'am: Can you write a recursive program to find powers of 2?

Me: Sure Ma'am.Wrote it immediately.

Ma'am: Can you optimize it?

Me: yes

Ma'am: how?

Me: Fast or Modular exponentiation ma'am.

Ma'am: Can you explain?

Me: Explained it with a simple example.

Ma'am: Write code for it .

Me: Wrote it immediately...

Ma'am: ok ruturaj, you may leave now...

............................

Finally on june 9, 1pm i got the offer letter from IITD.

Some Tips:
TRY TO SHIFT THE MOMENTUM TOWARDS THE FIELD IN WHICH YOU ARE STRONG DURING THE INTERVIEW.

DON'T GET NERVOUS IF YOU CAN'T ANSWER THE FIRST QUESTION, IT'S ABSOLUTELY OK.

DRESS WELL AND BE POLITE.