Hedge Funds v/s Mutual Funds

Recent efforts by the Indian government to weed out black money from the economy and increase the tax base have called for a paradigm shift in the way people in India choose to save their money. The pumping out of cash from the economy has brought the citizen to a point where he is considering … Continue reading Hedge Funds v/s Mutual Funds


2. Swap bits

Question : Given a number and 2 indices return the number after swapping bits present at those indices. Method-1 : Brute-Force We can swap bits by following the given steps :- 1. Using bitmasks to extract the ith and jth bits. 2. Save the extracted bits to some local variables. 3. Write the jth  bit to … Continue reading 2. Swap bits

1. Parity of a Word

Question : Compute the parity of a 64-bit word. Parity of a number refers to whether it contains an odd or an even number of 1's in its binary representation. The parity of a number is 1 if it contains odd number of 1's, else 0. Method-1 : Brute Force We can iteratively test the … Continue reading 1. Parity of a Word

A series on Programming Interview Questions

I have decided to write complete solutions and analysis of the questions that are frequently asked in programming interviews at major tech. companies for the position of Software Engineer/Software Engineering Intern. This series will contain exhaustive list of solutions for all the problems posed in The Elements Of Programming Interviews, I will also maintain a Github … Continue reading A series on Programming Interview Questions