Destination IIT is a blog created to help you provide information and help to secure admission into one of the most prestigious universities in the world. Featuring study material,study aids,interviews by IIT Toppers, this Webpage will offer you in depth information on all you want to know about IIT and techniques for acing JEE! If you want to be notified of site updates, you can choose to subscribe through a reader or through e-mail!
Monday, April 2, 2007
Saturday, March 31, 2007
Dear Mom: It is with great regret and sorrow that I'm writing you. I had to elope with my new boyfriend because I wanted to avoid a scene with Dad and you. I've been finding real passion with Ahmed and he is so nice-even with all his piercings, tattoos, beard, and his motorcycle clothes. But it's not only the passion Mom, I'm pregnant and Ahmed said that we will be very happy. He already owns a trailer in the woods and has a stack of firewood for the whole winter. He wants to have many more children with me and that's now one of my dreams too. Ahmed taught me that marijuana doesn't really hurt anyone and we'll be growing it for us and trading it with his friends for all the cocaine and ecstasy we want. In the meantime, we'll pray that science will find a cure for AIDS so Ahmed can get better; he sure deserves it!! Don't worry Mom, I'm 15 years old now and I know how to take care of myself. Someday I'm sure we'll be back to visit so you can get to know your grand children.
Your daughter, Judith
PS: Mom, none of the above is true. I'm over at the neighbor's house. I just wanted to remind you that there are worse things in life than my report card that's in my desk center drawer. I love you! Call when it is safe for me to come home.
-An e-mail
1. I can see your point, but I still think you’re full of shit.
2. I don’t know what your problem is, but I’ll bet it’s hard to pronounce.
3. How about never? Is never good for you?
4. I see you’ve set aside this special time to humiliate yourself in public.
5. I’m really easy to get along with once you people learn to see it my way.
6. I’ll try being nicer if you’ll try being smarter.
7. I’m out of my mind, but feel free to leave a message.
8. I don’t work here. I’m a consultant
.9. It sounds like English, but I can’t understand a damn word you’re saying.
10. Ahhhh .. I see the screw-up fairy has visited us again.
11. I like you. You remind me of myself when I was young and stupid.
12. You are validating my inherent mistrust of strangers.
13. I have plenty of talent and vision; I just don’t give a damn.
14. I’m already visualizing the duct tape over your mouth.
15. I will always cherish the initial misconceptions I had about you.
16. Thank you. We’re all refreshed and challenged by your unique point of view.
17. The fact that no one understands you doesn’t mean you’re an artist.
18. Any connections between your reality and mine is purely coincidental.
Friday, March 30, 2007
Our pale little blue dot
October 2nd, 2006This is a picture of Earth. Yes. If you look very carefully and closely, you’d see it. Just below the center line, on the right side, bathed in sunbeam. Yes, it’s that speck of dust.
“We succeeded in taking that picture [from deep space], and, if you look at it, you see a dot. That’s here. That’s home. That’s us. On it, everyone you ever heard of, every human being who ever lived, lived out their lives. The aggregate of all our joys and sufferings, thousands of confident religions, ideologies and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilizations, every king and peasant, every young couple in love, every hopeful child, every mother and father, every inventor and explorer, every teacher of morals, every corrupt politician, every superstar, every supreme leader, every saint and sinner in the history of our species, lived there on a mote of dust, suspended in a sunbeam.
The earth is a very small stage in a vast cosmic arena. Think of the rivers of blood spilled by all those generals and emperors so that in glory and in triumph they could become the momentary masters of a fraction of a dot. Think of the endless cruelties visited by the inhabitants of one corner of the dot on scarcely distinguishable inhabitants of some other corner of the dot. How frequent their misunderstandings, how eager they are to kill one another, how fervent their hatreds. Our posturings, our imagined self-importance, the delusion that we have some privileged position in the universe, are challenged by this point of pale light. Our planet is a lonely speck in the great enveloping cosmic dark. In our obscurity — in all this vastness — there is no hint that help will come from elsewhere to save us from ourselves. It is up to us. It’s been said that astronomy is a humbling, and I might add, a character-building experience. To my mind, there is perhaps no better demonstration of the folly of human conceits than this distant image of our tiny world. To me, it underscores our responsibility to deal more kindly and compassionately with one another and to preserve and cherish that pale blue dot, the only home we’ve ever known.”
This photo was taken by Voyager 1 in 1990 as it was returning from a space mission. The photo itself would not have been remarkable without the inspiring quote from Carl Sagan (an astronomer), that reminds us of how small we are, even though some times we think that we are the center of the universe, or even, the universe.
Shut Up I Hack You
In case you don't speak German (just as this hacker), I've tried a little translation to English. I might have made some spelling errors, but the original spelling wasn't perfect either. The guy really said "buy buy" in the German version.
For information:
- The dangerous hacker is called bitchchecker and the one being hacked and original author of the comments, who is talking here, is known as Elch.
- 127.0.0.1 is always the IP address of the computer you're currently using; any request there will return to your computer.
- Notice that in Germany we get Daylight Savings Time (DST) earlier than in the US.
The story starts (I'm shortcutting here) with a kid insulting everyone on the #stopHipHop IRC channel. Most people there believed it was rather funny, but it got even more funny...
* bitchchecker (~java@euirc-61a2169c.dip.t-dialin.net) has joined #stopHipHop
* bitchchecker (~java@euirc-61a2169c.dip.t-dialin.net) Quit (Ping timeout#)
What happened is clear: That guy entered his own IP address in his mighty Hack-Tool and crashed his own PC. This way, the attack on my PC was a failure.
I was already starting to think that I did not have to worry, but a good hacker never calls it a day. Two minutes later he returned.
* bitchchecker (~java@euirc-b5cd558e.dip.t-dialin.net) Quit (Ping timeout#)
There was a tension in the room... Would he manage, after these two failures, to crash my PC? I waited. Nothing happened. I felt relieve...
Six minutes passed by until he prepared the next wave of attack. Being a Hacker, who usually cracks whole data centers, he knew what his problem was now.
He calls me girly and says only his grandma would use a firewall. I know that elder people are much more intelligent then younger, but I couldn't let that rest. To see whether he really is a good hacker I lie and let everything as it is. I don't have a firewall at all, only my router.
In panic I started the Windows Explorer, my heart beating faster. Had I under-estimated him?
Yes, true, G: and F: were gone. Did I ever have them? Doesn't matter, I did not have time to think, I was scared. bitchchecker was comforting me with a music tip.
Drive E:? Oh my god... All the games are there! And the vacation pictures! I instantly take a look. Everything still there. But the hacker said it was deleted....
Or isn't it happening on my computer?
The guy is good: My CD-drive is allegedly deleted! Bitchchecker turned my ancient disk sucker into a burner! But how did he do this? I'll have to ask him. Some encourage him. He himself is giving advice how to avoid the disaster on my hard drives.
Should I tell him he's not attacking my computer?
Too late... It's 20:22 when we get the last message of our hacker with the alias "bitchchecker". We see that he has a "Ping timeout".
We haven't seen him since then... must be the Daylight Saving Time.
Wmd
![]() | These Weapons of Mass Destruction cannot be displayed |
The weapons you are looking for are currently unavailable. The country might be experiencing technical difficulties, or you may need to adjust your weapons inspectors mandate. | |
Please try the following:
Cannot find weapons or CIA Error |
Friday, January 26, 2007
Microsoft Interview Questions
The following are actual questions from actual interviews conducted by Microsoft employees on the main campus. Microsoft Consultants are sometimes allowed to have a life, so questions asked of them during interviews don't really count and aren't listed.The questions tend to follow some basic themes:
Riddles
- Why is a manhole cover round?
- How many cars are there in the USA? (A popular variant is "How many gas stations are there in the USA?")
- How many manhole covers are there in the USA?
- You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
- One train leaves Los Angeles at 15mph heading for New York. Another train leaves from New York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from Los Angeles at the same time as the train and flies back and forth between the two trains until they collide, how far will the bird have traveled?
- Imagine a disk spinning like a record player turn table. Half of the disk is black and the other is white. Assume you have an unlimited number of color sensors. How many sensors would you have to place around the disk to determine the direction the disk is spinning? Where would they be placed?
- Imagine an analog clock set to 12 o'clock. Note that the hour and minute hands overlap. How many times each day do both the hour and minute hands overlap? How would you determine the exact times of the day that this occurs?
- You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize the chances of a red marble being picked? What are the exact odds of getting a red marble using your scheme?
- Pairs of primes separated by a single number are called prime pairs. Examples are 17 and 19. Prove that the number between a prime pair is always divisible by 6 (assuming both numbers in the pair are greater than 6). Now prove that there are no 'prime triples.'
- There is a room with a door (closed) and three light bulbs. Outside the room there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can't change them. Identify each switch with its bulb.
- Suppose you had 8 billiard balls, and one of them was slightly heavier, but the only way to tell was by putting it on a scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
- Imagine you are standing in front of a mirror, facing it. Raise your left hand. Raise your right hand. Look at your reflection. When you raise your left hand your reflection raises what appears to be his right hand. But when you tilt your head up, your reflection does too, and does not appear to tilt his/her head down. Why is it that the mirror appears to reverse left and right, but not up and down?
- You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in just one measurement?
- The SF Chronicle has a word game where all the letters are scrambled up and you have to figure out what the word is. Imagine that a scrambled word is 5 characters long:
- How many possible solutions are there?
- What if we know which 5 letters are being used?
- Develop an algorithm to solve the word.
- There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace.
Woman 1: 1 minute to cross
Woman 2: 2 minutes to cross
Woman 3: 5 minutes to cross
Woman 4: 10 minutes to cross
For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?
- If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
- You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?
- If you have two buckets, one with red paint and the other with blue paint, and you take one cup from the blue bucket and poor it into the red bucket. Then you take one cup from the red bucket and poor it into the blue bucket. Which bucket has the highest ratio between red and blue? Prove it mathematically.
Algorithms
- What's the difference between a linked list and an array?
- Implement a linked list. Why did you pick the method you did?
- Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.
- Describe advantages and disadvantages of the various stock sorting algorithms.
- Implement an algorithm to reverse a linked list. Now do it without recursion.
- Implement an algorithm to insert a node into a circular linked list without traversing it.
- Implement an algorithm to sort an array. Why did you pick the method you did?
- Implement an algorithm to do wild card string matching.
- Implement strstr() (or some other string library function).
- Reverse a string. Optimize for speed. Optimize for space.
- Reverse the words in a sentence, i.e. "My name is Chris" becomes "Chris is name My." Optimize for speed. Optimize for space.
- Find a substring. Optimize for speed. Optimize for space.
- Compare two strings using O(n) time with constant space.
- Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
- Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
- Multiple by 8 without using multiplication or addition. Now do the same with 7.
- Add numbers in base n (not any of the popular ones like 10, 16, 8 or 2 -- I hear that Charles Simonyi, the inventor of Hungarian Notation, favors -2 when asking this question).
- Write routines to read and write a bounded buffer.
- Write routines to manage a heap using an existing array.
- Implement an algorithm to take an array and return one with only unique elements in it.
- Implement an algorithm that takes two strings as input, and returns the intersection of the two, with each letter represented at most once. Now speed it up. Now test it.
- Implement an algorithm to print out all files below a given root node.
- Given that you are receiving samples from an instrument at a constant rate, and you have constant storage space, how would you design a storage algorithm that would allow me to get a representative readout of data, no matter when I looked at it? In other words, representative of the behavior of the system to date.
- How would you find a cycle in a linked list?
- Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
- The following asm block performs a common math function, what is it?
cwd xor ax, dx
sub ax, dx - Imagine this scenario:
I/O completion ports are communictaions ports which take handles to files, sockets, or any other I/O. When a Read or Write is submitted to them, they cache the data (if necessary), and attempt to take the request to completion. Upon error or completion, they call a user-supplied function to let the users application know that that particular request has completed. They work asynchronously, and can process an unlimited number of simultaneous requests.
Design the implementation and thread models for I/O completion ports. Remember to take into account multi-processor machines. - Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value.
- Write a function to print all of the permutations of a string.
- Implement malloc.
- Write a function to print the Fibonacci numbers.
- Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B.
- How would you write qsort?
- How would you print out the data in a binary tree, level by level, starting at the top?
Applications
- How can computer technology be integrated in an elevator system for a hundred story office building? How do you optimize for availability? How would variation of traffic over a typical work week or floor or time of day affect this?
- How would you implement copy-protection on a control which can be embedded in a document and duplicated readily via the Internet?
- Define a user interface for indenting selected text in a Word document. Consider selections ranging from a single sentence up through selections of several pages. Consider selections not currently visible or only partially visible. What are the states of the new UI controls? How will the user know what the controls are for and when to use them?
- How would you redesign an ATM?
- Suppose we wanted to run a microwave oven from the computer. What kind of software would you write to do this?
- What is the difference between an Ethernet Address and an IP address?
- How would you design a coffee-machine for an automobile.
- If you could add any feature to Microsoft Word, what would it be?
- How would you go about building a keyboard for 1-handed users?
- How would you build an alarm clock for deaf people?
Thinkers
- How are M&Ms made?
- If you had a clock with lots of moving mechanical parts, you took it apart piece by piece without keeping track of the method of how it was disassembled, then you put it back together and discovered that 3 important parts were not included; how would you go about reassembling the clock?
- If you had to learn a new computer language, how would you go about doing it?
- You have been assigned to design Bill Gates bathroom. Naturally, cost is not a consideration. You may not speak to Bill.
- What was the hardest question asked of you so far today?
- If MS told you we were willing to invest $5 million in a start up of your choice, what business would you start? Why?
- If you could gather all of the computer manufacturers in the world together into one room and then tell them one thing that they would be compelled to do, what would it be?
- Explain a scenario for testing a salt shaker.
- If you are going to receive an award in 5 years, what is it for and who is the audience?
- How would you explain how to use Microsoft Excel to your grandma?
- Why is it that when you turn on the hot water in any hotel, for example, the hot water comes pouring out almost instantaneously?
- Why do you want to work at Microsoft?
- Suppose you go home, enter your house/apartment, hit the light switch, and nothing happens - no light floods the room. What exactly, in order, are the steps you would take in determining what the problem was?
- Interviewer hands you a black pen and says nothing but "This pen is red."
Think like a Genius
The following eight strategies encourage you to think productively, rather than reproductively, in order to arrive at solutions to problems. "These strategies are common to the thinking styles of creative geniuses in science, art, and industry throughout history."
1. Look at problems in many different ways, and find new perspectives that no one else has taken (or no one else has publicized!)
Leonardo da Vinci believed that, to gain knowledge about the form of a problem, you begin by learning how to restructure it in many different ways. He felt that the first way he looked at a problem was too biased. Often, the problem itself is reconstructed and becomes a new one.
2. Visualize!
When Einstein thought through a problem, he always found it necessary to formulate his subject in as many different ways as possible, including using diagrams. He visualized solutions, and believed that words and numbers as such did not play a significant role in his thinking process.
3. Produce! A distinguishing characteristic of genius is productivity.
Thomas Edison held 1,093 patents. He guaranteed productivity by giving himself and his assistants idea quotas. In a study of 2,036 scientists throughout history, Dean Keith Simonton of the University of California at Davis found that the most respected scientists produced not only great works, but also many "bad" ones. They weren't afraid to fail, or to produce mediocre in order to arrive at excellence.
4. Make novel combinations. Combine, and recombine, ideas, images, and thoughts into different combinations no matter how incongruent or unusual.
The laws of heredity on which the modern science of genetics is based came from the Austrian monk Grego Mendel, who combined mathematics and biology to create a new science.
5. Form relationships; make connections between dissimilar subjects.
Da Vinci forced a relationship between the sound of a bell and a stone hitting water. This enabled him to make the connection that sound travels in waves. Samuel Morse invented relay stations for telegraphic signals when observing relay stations for horses.
6. Think in opposites.
Physicist Niels Bohr believed, that if you held opposites together, then you suspend your thought, and your mind moves to a new level. His ability to imagine light as both a particle and a wave led to his conception of the principle of complementarity. Suspending thought (logic) may allow your mind to create a new form.
7. Think metaphorically.
Aristotle considered metaphor a sign of genius, and believed that the individual who had the capacity to perceive resemblances between two separate areas of existence and link them together was a person of special gifts.
8. Prepare yourself for chance.
Whenever we attempt to do something and fail, we end up doing something else. That is the first principle of creative accident. Failure can be productive only if we do not focus on it as an unproductive result. Instead: analyze the process, its components, and how you can change them, to arrive at other results. Do not ask the question "Why have I failed?", but rather "What have I done?"