Wednesday, May 18, 2011

How to screw your telephonic interview in five simple ways !!


Having three telephonic interviews experience, all being unsuccessful, I consider myself as the master of my group. Ya, the group of people who are good at screwing up their interviews. Wanna join this elite group ? You just need to take the below mentioned five easy steps before and during the telephonic interview as required.

The five glorious steps:

  • As per the procedure of the interview, the HR of the company calls up the student (to be interviewed) for the first time. Aim of HR is to convey student the interview timings, confirm his phone number and get aquainted to his background. The blunder you can do at this time is not to ask about the type of questions you would be asked during the interview. If you didn't do that.. you just took first step to join my elite group ! Certain companies (like facebook) prefer asking the algorithm questions (just like those in programming contests) whereas other companies (like Magma Inc. and Directi) check student's logic and reasoning by asking puzzles.

  • The second blunder you can do is to consider yourself superman and not prepare anything for the day. Do not even bother to look upon previously asked questions by the company or get yourself aquainted with famous puzzles asked during interviews.

  • You'll be just two steps away if you don't charge the mobile enough for an hour long interview on the death day.

  • The second last blunder you can do is to choose such a place for the interview where you get the weakest mobile signal as in casually lying in your bedroom and getting the call with no ear phones or your bathroom so that none of your friend sees you or hears your conversation !!

  • The last but not the least blunder you can do is to get fumbled up in nearly all the questions asked. Push the panic button again and again. Beat around the bush, don't hit the point and make the interviewer furious over you.

Ok, ya I m a little too agitated about another failed telephonic interview. The point is you can read the five steps, exactly do the opposite and make you interview much more comfortable and impressive.

* * * * *

Tuesday, March 8, 2011

Algothematics.. back again !!


Algothematics is back.. smarter and trickier !! Algothematics was first introduced in Zealicon '10 (annual TechFest of JSS Academy of Technical Education, Noida) and is slated for 9th March in Zealicon'11. Just as the last year, the event will be conducted online. All programmers across the world are, hence, invited.

Rules are the same. The event comprises of 15 levels. Each level has an ad-hoc mathematical problem which can either be solved manually (using pen and paper) or by conceiving certain algorithm. The submission requires only the answer to the question. Submission of source-code is not required.

Other tools can also be used for solving the problems. Spreadsheet, PARI-GP, MATLAB or anyother library (like BigInteger) are among them. Besides all these we always have GOOGLE with us... :)

Besides all this, Zealicon forum will contain an "Algothematics" thread under "online events" where all sorts of problems and their hints will be discussed. No questions extraneous to the event will be entertained.
LeaderBoard will be available at the home page itself, so that you can constantly check your position among others.

Please do not ruin the basic purpose of event by any hacking stuff. Those not conforming to the rules and regulations will be banned without prior information. Decision of Algothematics Team will be the last.

First two teams reaching the final level will be adjudged victorious..

So pull up your socks, hone your programming skills.. Algothematics is about to begin..!!! (9th March, 20:00)

* * * * *

Saturday, February 5, 2011

Getting started with USACO



USACO (or United States of America Coding Olympiad) is a programming competition primarily for students in USA. It allows codes to be written in c, c++, java and pascal programming languages. There are currently three divisions of the USACO: Bronze (easiest but requires some programming ability), Silver, and Gold (hardest). Participants advance through the divisions by performing well in their current division, or in a qualifying round.

Training pages, internet competitions, US Open ( please don't confuse it with the grand slam :P ) form the basic three parts of USACO. Of these three - training pages are of our interest. These pages are designed to develop one's skills in programming solutions to difficult and varied algorithmic problems at one's own pace. In addition to around several problems, there are texts on programming techniques such as greedy algorithms, dynamic programming, shortest path and many more. Enthusiasts find the training pages so useful that people from other countries use them to prepare for their own national or international level competitions. Amazing thing is that today the coders from other countries have out numbered the US participants !! :P

For getting started with USACO you can register by clicking here. After the registration you can begin with the chapters and corresponding sections through the USACO gateway. The submissions at USACO must conform by following rules:
  • All solutions must have a header as follows:
/*
ID: YourId
PROG: the name of program which will be provided in the problem statement itself
LANG: preferred language
*/
  • The input needs to be read from a file named PROG.in (PROG refers to name of the program as mentioned in header) and output written onto another file named PROG.out.
  • The output file must have a whitespace at the end else it will not compile.

Here's my solution to a problem named Dual Palindromes:

/*

ID: vaibhav4

PROG: dualpal

LANG: C++

*/


#include<fstream>

#include<iostream>

using namespace std;

int isPal(string a)

{

 int i,j;

 for(i=0,j=a.size()-1;i<j;i++,j--)

     if(a[i]!=a[j]) return 0;

 return 1;

}

string conv(int decimal, int base)

{

 if(decimal == 0) return "0";

 char NUMS[] = "0123456789ABCDEFGHIJ";

 string result = "";

 do

 {

     result.push_back(NUMS[decimal%base]);

     decimal /= base;

 }while(decimal != 0);



 return string(result.rbegin(), result.rend());

}

int main()

{

 ifstream cin("dualpal.in");

 ofstream cout("dualpal.out");

 int s,n,i,count=0,count1=0;

 cin>>n>>s;

 s++;

 while(count!=n)

 {

     count1=0;

     for(i=2;i<=10;i++)

     {

         if(isPal(conv(s,i)))

             count1++;

         if(count1>=2)

         {

             cout<<s<<"\n";

             count++;

             break;

         }

     }

     s++;

 }

 return 0;

}

Hope it's now easy to get started with USACO..
Happy Coding !!

* * * * *

Thursday, January 6, 2011

an ACM experience



..and finally we disembarked at Kanpur.
Competing at the world's most prestigious programming event (even at the regional level :P ) looked just like a dream earlier but not any more. On 11th of December 2010, we were on our way to IIT Kanpur for competing with some of the best coders of this country. We were (Team name: Elites) amongst the top 50 teams of Northern India who were invited to participate at the ACM regional level after qualifying the prelims, which was held earlier amongst more than 200 teams.

On reaching the campus we were greeted with two goody bags. One was from ACM itself and the second came from Directi, the official sponsers of the event. Goody bags were loaded with some really good stuff ranging from T-shirts, diaries to pens and badges. Great hospitality, awesome management and top-class environment at IIT Kanpur were the things they can really boast about.

On 12th December the teams competed for five hours. There were ten problems given. By the end, we managed to solve three problems (and managed to win three pen drives !!! :P ). The team from Indonesia (Dongskar Pedongi) came first solving eight questions whereas team from IIIT Hyderabad (Any Dream) came second solving seven probelms. The team from Hyderabad included Yash Kumar and Nadeem Moidu, who held the second and fifth position in the AOL CodeDash competition too.

But the team that made it to Egypt (for world finals) was from IIT Kanpur (Deep thought). I would like to further elaborate details about the team members. The team consisted of three members:

Raziman TV, who is a blogger and you can visit his blog "Mistranslated" here. He has won many such events both at the regional and the world level. The entire achievements list of Raziman can be seen here. Now possibly he has one more achievement of ACM to brag about!! :D

Shitikanth was the second member. He topped the IIT-JEE 2008 examination (AIR-1). He is a regular codechef member too.

Utkarsh Lath is also a codechef member and much higher placed than his colleague Shitikanth.
With such great coders IIT Kanpur really deserved to win the world finals berth.

Later in the prize distribution ceremony, I was pleased to see my friend Rahul Gulati (Team name: HyperHexagon) secure the tenth place. We (with Prateek Gupta and Ankit Jain as my team-mates) were amongst the honourable mentioned ones as we managed to solve more than one question. With more than half a dozen of certis we bid IIT Kanpur adieu.

Summing up the entire event.. it was really an amazing ACM experience.. :)

* * * * *

Sunday, September 26, 2010

My Stackoverflow Badge


Stack Overflow profile for vaibhav



This is my Stackoverflow badge. Stackoverflow, as most of you would be knowing, is a website part of the Stack Exchange Network featuring questions and answers on a wide range of topics in computer programming.
I have earned these many points asking questions and posting some quality answers on topics ranging from c/c++ programming, asp. net, Eclipse and Android.

* * * * *

Tuesday, September 7, 2010

My Project Euler Badge

Above is my Project Euler Badge. It shows my username and the number of questions I have solved. It keeps on changing dynamically.

* * * * *

Saturday, August 21, 2010

Getting started with Linux File System

via my friend Prateek Gupta ...

For those of you coming from windows background, the way the linux filesystem is laid out may seem confusing at first glance…. but that is where this article comes in !

The first thing you should know when working with linux, is that everything is treated as either a file or directory. Yep thats right, even hardware is considered a file by linux, and, speaking of hardware… all your hardware devices are located in the /dev directory, but more on that... later.

Another thing that confuses windows users, is the fact that linux dosen’t use drive letters to distinguish between different partitions and devices. that is to say in linux, the “root” of your filesystem is / whereas in windows it would most probably be C:\ . Drives in linux are “mounted” to directories where their data can then be accessed, so for instance, if you needed to use your thumbdrive, you would plug it into your computer, and then mount it using the “mount” command, which specifies the path to the device ( something like /dev/sdb or /dev/sdc ) and the directory to mount it to (usually /mnt or /media), then you can happily access your drive from the /mnt or /media folder.

Sounds strange right? well yes it does if you come from a windows environment, where the entire operating system is consolidated onto a single drive. However, with linux and the ability to mount devices as directories, it gives the end user much greater flexibility in splitting up their operating system over several drives or partitions.

To understand what I mean when I say that this approach in mounting drives grants flexibility, I must first explain the different folders in linux and what they store / this is the root folder, all other folders come under root.. think of it as C:\ in a Windows context.

/bin this folder contains all the user-essential binaries (programs) that are needed to administer and run your linux system… delete this folder and your system is broken.

/boot as the name suggests, this folder contains configuration files and other necessary files that are needed by the bootloader

/dev this folder contains device files (remember, these files represent physical devices, so be careful when working with them)

/etc this folder contains all the configuration files used by the system, you can also start and stop services (daemons ) from here

/home this folder contains the home folders of all the normal (non – root ) users on the system .. think of it as my documents in windows

/lib this folder contains software libraries

/media this is a mount point for removable devices… this is where you would usually mount your thumbdrives … etc

/mnt this is a temporary mount point

/opt this folder contains add on software (extra software)

/sbin this folder contains binaries that can only be run as the root user (”superuser”)

/tmp this folder contains temporary files that are erased upon reboot

/usr this folder and its subfolders contains user installed programs and utilities and libraries

/var this folder contains files that change alot (”Variable files”)

/root this folder contians the root user’s files

/proc this is a psuedo folder, that contains information about the linux kernel and hardware that is updated in realtime.

Now back to how mounting grants flexibility…

You see, how the different folders all contain parts of the operating system? Well we can actually mount a seperate hard drive for each of this folders. for example, your /home folder can be put on another harddrive than your / which means that you can easily recover your personal files if the harddrive on / fails because the harddrive mounted to your /home folder is seperate from the one that is mounted to your /

So there you have it, you now know a lttle bit more about the nuts and bolts of linux based operating systems.

* * * * *