Some of the common riddles which will be asked in the interviews are …. 0. Classic: If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks oneContinue reading… Riddles
Author: vamsipavan
Problmes on Bit Manipulations
1. Reverse the bits of an unsigned integer. ANS. #define reverse(x) (x=x>>16|(0x0000ffff&x)<<16, x=(0xff00ff00&x)>>8|(0x00ff00ff&x)<<8, x=(0xf0f0f0f0&x)>>4|(0x0f0f0f0f&x)<<4, x=(0xcccccccc&x)>>2|(0x33333333&x)<<2, x=(0xaaaaaaaa&x)>>1|(0x55555555&x)<<1) *2. Compute the number of ones in an unsigned integer. ANS. #define count_ones(x) (x=(0xaaaaaaaa&x)>>1+(0x55555555&x), x=(0xcccccccc&x)>>2+(0x33333333&x), x=(0xf0f0f0f0&x)>>4+(0x0f0f0f0f&x), x=(0xff00ff00&x)>>8+(0x00ff00ff&x), x=x>>16+(0x0000ffff&x)) 3. Compute the discrete log ofContinue reading… Problmes on Bit Manipulations
Problmes on Linked List
*1. Under what circumstances can one delete an element from a singly linked list in constant time? ANS. If the list is circular and there are no references to the nodes in the list from anywhere else! Just copy theContinue reading… Problmes on Linked List
Programming puzzles 1
Some of the Technical Interview Questions For Computer Science Programmers …. The following is a list of questions which have been floating around some Internet circles. They are excellent prep questions for a technical interview. Don't bother asking me forContinue reading… Programming puzzles 1
Count down started !!
Another 9 days left to start a new life of an employee … So mean while thought of putting some words on this web on daily basis as my diary. Let me see how regular I am 🙂 .
When things achieve perfection ….
When I am working on a search engine projects, suddenly I got one thought that is what happens when search become perfect ?(though we are not even close to that). Just think in that way, suppose we achieved our searchContinue reading… When things achieve perfection ….
Visual Intelligence …
Do you any time think about Illusion images, how we visualize those images ? Of course, even I never think about that, even though I have large collection of such illusions. But the interesting thing is – they have veryContinue reading… Visual Intelligence …
Some resources for Fedora Installations …..
Fedora Core 4 Linux Installation Notes Personal Fedora Core 4 Installation Guide Fedora Core 3 Linux Installation Notes Personal Fedora Core 3 Installation Guide Fedora Core 4 Tips and Tricks Unofficial guide for Fedora Core Fedora Multimedia Installation Some more
Write permissions to vfat filesystems for normal users
We all know the normal usage of ‘mount’ as command line usage: $ mount -t /dev/hda1 /mnt/directory in /etc/fstab file: /dev/hda1 /mnt/directory vfat defaults 0 0 By using either of above usages, only root can have write permissions on vfatContinue reading… Write permissions to vfat filesystems for normal users
Fetchmail usage
To configure fetchmail (I hope you know that it is used to download mails from remote server to localsystem), create file named ‘.fetchmailrc’ in home directory and add the following line to it. poll [server ip address] with proto [serverContinue reading… Fetchmail usage