coder interview

Upload: johnnokia

Post on 05-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Coder interview

    1/5

    ... a blog by Anil Kishore

    RedAnt's Arena - People - Ponder - Programming;

    MONDAY, MAY 14, 2012

    Know An Indian Coder : Rudradev Basak

    When I (Anil Kishore) started taking part in algorithmic programming contests, for more than two years, it was

    just me, lot of problems, very few algorithms, my ideas and my Java codes. With that, I would have probably

    been still a green rated coder, working for a software company in Bangalore after moving between two or three

    places, still in search of the right things to do. But why ? Problems, Algorithms, my Ideas and my Codes.. what

    else I need ? This is where many Indian coders make mistake. Almost two years after joining TopCoder (TC), I

    started interacting with fellow coders, knowing more about them, reading lots of others codes, being active in

    forums and part of the wonderful community. That was the crucial part of my career so far. TC has some

    interviews of foreign coders and they are very interesting to read. Knowing more about our own Indian coders

    will be more fun, especially for beginners to get inspired. This is the least I can contribute to the wonderful

    community that has given a strong foundation to my career, introduced to me some amazing people around the

    world.

    ( This post is for coders, especially Indian coders. If you are not a TopCoder member or not interested in algorithm / programming /

    math contests, this may not be very interesting to you. )

    This is the first interview post in this blog and no prizes for guessing correctly whom it is with ( because you

    read the title already ;) ). This interview is with Rudradev Basak, or should I say rudradevbasak, also known

    as Rudy. He is undoubtedly one of the best Indian coders of all time and is currently leading the Indian rank list

    in TopCoder, CodeForces, CodeChef. He is also part of the team Proof of IIT-Delhi along with Nikhil and

    Pradeep, that won ACM-ICPC AsiaAmritapuri regionals 2011-12. They will be representing IIT-Delhi this year (

    second time in a row ) at theACM-ICPC World Finals 2012, Warsaw, Poland. So, lets find out more about Rudy,

    his way of competing and more.

    Tell us about yourself and your schooling

    I was born in Burnpur, near the city of Asansol in West Bengal. I attended St.

    Vincents School in Asansol, a highly disciplined school run by the Christian Brothers.

    For +2, I shifted to another school, named BRS (Burnpur Riverside School). There Iqualified within top 30 of INMO(Indian National Maths Olympiad), and that was a

    pretty big thing for my school at the time. (I had qualified the RMO for the last two

    years, but could not manage to qualify INMO) The headmaster gave me leave to

    study for IIT-JEE, and not come to school at all :P. Anyway I attended the

    IMOTC(International Maths Olympiad Training Camp) for 2 consecutive years, and

    also was a part of the Indian IMO Team in 2008, and that was an extremely

    enlightening experience for me. It was at the camp, that I was given the nickname

    Rudy, which has stuck till this day. Also I managed to get into the CS Department at IIT Delhi, and met an entire

    bunch of awesome and brilliant people.

    How did you get in to algorithms, problem solving and competitive programming ?

    In IIT Delhi, the first couple of semesters had a basic intro to CS course, and a Data

    Structures Course. At that time I did discuss algorithmic problems with friends once in a

    while, but I did not go into competitive programming at all, even though I had heard about

    TopCoder. In my fourth semester (Jan-May 2010), I had the course CSL356 - Analysis and

    Design of Algorithms. And one day, I happened to see a fellow student, Jatin Batra, doing

    Topcoder in the institute lab. I went up to him, and saw that, contrary to my preconceptions

    about Topcoder problems, the problem he was solving was quite doable. That was the moment

    that got me into doing TC and into competitive programming in general. I had a good first match, catapulting

    me to Div1, and since then I have been pretty addicted to it. It helped that in the summer of 2010, I was at the

    institute doing a summer project, but still had plenty of free time. I also got into doing TC Marathons at that

    time, which I think has at least helped my implementation skills.

    When did you start preparing for ACM-ICPC and how did you practice for it ?

    2012 (2)

    May (2)

    Know An IndianCoder :Rudradev Basak

    kickoff

    BLOG ARCHIVE

    FOLLOW BY EMAIL

    Email address... Submit

    "In character, in

    manner, in style, in

    all things, the

    supreme excellence

    is simplicity."

    QUOTE OF THIS WEEK

    Hit

    Super Hit

    Vote Show results

    Votes so far: 19

    Da s left to vote: 17

    PAWAN KALYAN'S

    'GABBAR SINGH' MOVIE

    WILL BE A .. ?

    Share Report Abuse Next Blog [email protected] Dashboard Sign Out

    Ant's Arena - People - Ponder - Programming;: Know ... http://kungfuant.blogspot.in/2012/05/know-indian-c

    5 Monday 14 May 2012 04

  • 7/31/2019 Coder interview

    2/5

    My

    topcoder participation also galvanized my teammates, Nikhil Garg and Pradeep Mathias, to become more activein coding. And in the next semester (Aug-Dec 2010), we decided to try out for ICPC. We started practice slowly,

    barely meeting once in a couple of weeks at first, but later accelerated a lot. We learned an awful lot from each

    other, and in that November/December, I remember us practicing in a frenzy, especially in the 14 day gap

    between the end of Major exams and the Amritapuri Regionals. Each of us routinely crossed 12 hours a day in

    coding, both individual and team practice. That was a level of dedication and hard work we would never match

    again in the future.

    The hard work paid off, as we came 2nd at the Amritapuri Regionals, and to this day, that remains my most

    satisfying moment in my contest career. Since then, we have done sporadic practice, sometimes going weeks

    without doing any, and sometimes gathering enough motivation to get into a pretty rigorous routine. I have still

    tried my best to do as many contests as possible, and maintain a medium level of practice, as far as my mood

    will allow. And I hope that this time, we will perform well in the ICPC World Finals, happening in Warsaw in 4

    days time.

    Many Indian coders admire you. Who are some coders whom you admire ?

    There are a lot of coders I admire. I remember meeting Venkatesh Basker in Amritapuri Regionals 2010, and he

    gave us a lot of encouragement. Ajay Somani and Varun Jalan were also idols to me. Besides of course, I admire

    all the targets and almost-targets, those geniuses from around the world.

    What is your strategy during TopCoder algorithm matches ?

    Like most I open the 250 point problem first. For me, nowadays, aim is to solve 250

    in < 10 mins, and faster if possible. So I try to read the question as fast as possible.

    While midway through reading the question, I try to guess what is the quantity that

    the problem is going to ask from me. And I get it right a considerable fraction of

    time. Parallelly ideas start forming to solve the problem. I generally try to avoid

    reading the example test cases before coding (unless the problem statement wasreally complex and I needed some clearing up). I find that they often misdirect my

    thoughts in weird directions. Type as fast as I can, and hit Compile. Number of times

    I hit Compile Error on 250 pointer before getting it to run is on average I think

    around 1 in recent months. If examples passed, then glance through the examples for the first time, glance

    through the code once, and Submit! If not passed, then I actually try to read the sample test cases properly, and

    go on about debugging the code. In any case, after I submit, I look at the division summary for the first time,

    (unless I haven't been able to solve the 250 in say 15 mins). In cases where I submit immediately on passing

    examples, I generally spend a couple of minutes more trying to check and recheck stuff. I think it has helped me

    to correct mistakes twice in recent past. Although Reading speed isn't that important, I still think people should

    try to improve in that area, in general, and not only for topcoder purposes.

    Solving the 250 gives me an adrenaline rush unlike anything else (except maybe the first couple of minutes in

    challenge phase, and the split-second wait after you submit a challenge). Once I decide to open the 500, things

    calm down a lot. I try not to look at the Division Summary too often. In fact, I have noticed that if I am not

    getting ideas in the 500, then checking the division summary seems to make it worse. So I have made it a pointnowadays not to look at the Division Summary at all within 30 minutes after opening the 500.

    You seem to have gained some points from challenges these days, what did you change ?

    If in the last few minutes of the coding period, if I see that I have virtually no chance of completing another

    problem, I switch to test case generation mode. Up until a few matches ago, I was very poor at challenging (I

    had total career challenge points negative !). In recent matches I've been able to sneak in a few challenges here

    and there. Often I fixate on a few plausible bugs that others might have left in their code, and only focus on

    those issues in the first 5 minutes of challenge phase. Later I switch to random solution mode. Finding a bug,

    creating a test case, clicking challenge, and waiting for that split second before the verdict is, as anyone who

    has experienced it will agree, a breathtaking experience.

    Pradeep, Rudradev, Nikhil at the 2011 ACM-ICPC World Finals

    Ant's Arena - People - Ponder - Programming;: Know ... http://kungfuant.blogspot.in/2012/05/know-indian-c

    5 Monday 14 May 2012 04

  • 7/31/2019 Coder interview

    3/5

    Posted byAnil Kishore at 3:57 AM

    Labels: interview, programming, rudradev, topcoder

    What is the role of elegance and simplicity of code in short contests ?

    Even though in the short run, writing code fast, and writing elegant/simple code, may seem to be conflicting, I

    believe that in the long run, maintaining simplicity of code and elegance of solutions is very much in line with

    writing fast and correct code. Of course it may not seem easy at first, but practicing and making it a habit of

    writing code elegantly will definitely help.

    Do you listen to music while competing ?

    I tried solving SRMs while listening to music a couple of times, but it didn't turn out

    very good for me. However I do like to listen to some calming music in the 10

    minutes right before the match starts. I have found that this calming helps me to

    maintain a more vigorous attitude during solving the 250 later on.

    What are some current milestones you want to reach in coding contests ?

    Getting to the onsite finals of Topcoder Open and Google Code Jam are some milestones I would really love to

    reach.

    Finally, what advice do you give to different levels of coders ?

    First, before I advise people to practice harder, I want to say, "Practice ONLY if you

    actually enjoy it/want to do it. There is no point in practicing just for the sake of some

    vague goal in the future which you may or may not attain." Now, the only advice I can

    give to people, is to practice!. On topcoder, grays and greens need to learn

    implementation skills, and to convert their thought process into code efficiently, and

    NOT learn up algorithms. Once one progresses to higher green, or blue, then you

    need to actually start learning algorithms. For higher rated people, identifying your

    weak points, improving your accuracy, and MORE practice should help :) Also, for all

    people, reading code of other higher rated coders will always be helpful.

    ___________________________________________________________________________

    Lets thank Rudy for taking his time in replying to my questions and wish him all the best for his career. Hope to

    see him as a TC target soon and wish his team good luck in World Finals this week, and beat the previous best

    Indian rank : 29. Lets also wish other Indian teams in ACM-ICPC World Finals in Poland this week, all the very

    best, especially the team TuringMachine ( Anish, Kunal and Nadeem ) of IIIT-Hyderabad ;). Make us proud

    guys !

    ...........

    So how did you like this post ? Have more questions ( non-technical ) to Rudy or any one ? Want more such

    posts from others ? anything... drop a comment below to let me know.

    ~ AK

    +3 Recommend this on Google

    13 comments:

    Anonymous May 14, 2012 4:49 AM

    Lets consider a beginner who just started programming and he just know's 'c'. What is ur advice to him? How to

    start and improve himself? Like a roadmap(beginner to expert)!!! This question is not just mine!! From many

    beginners.

    Reply

    Ant's Arena - People - Ponder - Programming;: Know ... http://kungfuant.blogspot.in/2012/05/know-indian-c

    5 Monday 14 May 2012 04

  • 7/31/2019 Coder interview

    4/5

    Anil Kishore May 14, 2012 5:16 AM

    There is no such specific path to take. Think of the basic things, 1. Study standard algorithms 2. Practice by solving

    lot of problems. Its just that. I would strongly suggest to follow TopCoder and be active in the community, not just in

    the contest arena. If you are familiar with TopCoder, here is the road map : grey -> green -> blue -> yellow -> red :)

    Reply

    Anonymous May 14, 2012 9:36 AM

    Is there a specific/helpful list of topics written somewhere we all need to know before entering TC? I am talking

    about techniques like solving recurrences in logarithmic time, etc...we cannot find such things in text books.

    Reply

    Anonymous May 14, 2012 10:15 AM

    Nice post...really helpful. Thanks Anil!

    Reply

    Saket Bharambe May 14, 2012 11:04 AM

    Cool post, waiting for more, especially yours!.

    Generally, people would quit coding if they stay grey for more than 5-6 SRMS, But this page/graph (link below) has

    always inspired me and it still does!. Your story will be a great inspiration for all, please do post it soon.

    http://community.topcoder.com/tc?module=MemberProfile&cr=22647580

    ~SBReply

    Ishan Chattopadhyaya May 14, 2012 11:22 AM

    Good post and a great guy. Met Rudradev at some mall in Bangalore (KFC of Forum Mall, I think) some 1 year back

    while he was pursuing his internship at Microsoft. Found him humble as ever for his acomplishments and I

    remember being inspired. Keep going, Rudradev.. way to go!!

    Reply

    Anil Kishore May 14, 2012 11:40 AM

    Thanks Saket, I can't imagine someone getting inspired by that graph :p

    .

    @ all : Seems another common misconception many of us have is, "TopCoder is for contests and so we need to know

    something before entering". But that is not true. TC is a place to learn from scratch and do contests just for fun

    initially and not worry about ratings at all. If your graph is really bad and then improves slowly, it will be very

    appealing :). You can't ask ques like "What to learn", "Where to learn", "How was your journey.." etc., this is

    something you have to experience yourself, waste a lot of time, realize 100s of small things, approach in own style !

    I'll make a post about my small story soon. Good to know that many of you liked this :). If you have specific ques, do

    not post as Anonymous, so we can point at you in replies.

    Reply

    Anonymous May 14, 2012 12:05 PM

    Brilliant post!! Keep it up. :)

    Reply

    sai16vickyMay 14, 2012 1:50 PM

    Nice post Anil Anna and thanks to Rudy for sharing his experience. But I would be really willing to know Anil's story.

    Reply

    Sonu May 14, 2012 1:52 PM

    Nice inspiring post .

    you said "for more than two years, it was just me, lot of problems, very few algorithms, my ideas and my Java codes.

    With that, I would have probably been still a green rated coder, working for a software company in Bangalore after

    moving between two or three places, still in search of the right things to do. But why ? Problems, Algorithms, my

    Ideas and my Codes.. what else I need ? This is where many Indian coders make mistake. "

    this exactly seems my story .Its been 2 and half years , i know some algorithms,some tips but i keep oscillating b/w

    grey and green circle at topcoder , same is story at codechef.

    "Almost two years after joining TopCoder (TC), I started interacting with fellow coders, knowing more about them,

    reading lots of others codes, being active in forums and part of the wonderful community. That was the crucial part

    Ant's Arena - People - Ponder - Programming;: Know ... http://kungfuant.blogspot.in/2012/05/know-indian-c

    5 Monday 14 May 2012 04

  • 7/31/2019 Coder interview

    5/5

    Older PostHome

    Subscribe to: Post Comments (Atom)

    Replies

    Reply

    Subscribe by email

    Enter your comment...

    Comment as: gauravrai (Google) Sign out

    Publish Preview

    Create a Link

    of my career so far"

    "

    Currently i am only active a arena , can you please elaborate how one can try to be more active.I know it is sounding

    silly and you already have answered in above paragraph but elaborating it will help me.

    Thanks !!

    PS : sorry for posting same post again but not as anonymous this time.

    Reply

    amit May 14, 2012 1:54 PM

    inspiring post !!!!!!!!!

    Reply

    Raziman T VMay 14, 2012 3:07 PM

    Kind of expected this to be the first post :)

    Reply

    Anil Kishore May 14, 2012 3:09 PM

    Glad that I reached your expectations ;)

    Links to this post

    2 TOTAL PAGEVIEWS

    1 4 2 8 Share this on FacebookTweet this

    View stats

    (NEW) Appointment gadget >>

    SHARE IT

    Anil Kishore. Picture Window template. Powered by Blogger.

    Ant's Arena - People - Ponder - Programming;: Know ... http://kungfuant.blogspot.in/2012/05/know-indian-c

    5 M d 14 M 2012 04