Showing posts with label FaceBook Engineering Team. Show all posts
Showing posts with label FaceBook Engineering Team. Show all posts

Saturday, November 16, 2013

Given a deck of nCards unique cards, cut the deck iCut cards from top and perform a perfect shuffle. A perfect shuffle begins by putting down the bottom card from the top portion of the deck followed by the bottom card from the bottom portion of the deck followed by the next card from the top portion, etc., alternating cards until one portion is used up. The remaining cards go on top. The problem is to find the number of perfect shuffles required to return the deck to its original order.

Example if  nCards=9 and ICut=6 then for  N=123456789 , you need 3 shuffle to get the original positions , wondering how , try it now and  feel free to post comment here .

Wednesday, October 2, 2013

Thursday, August 9, 2012

d cube root of number without using any library function number can be as large as 10^1000


Count no of different places tommy can cover from home to school condition is one place can't be visited twice and after reaching school he can't proceed further.


Tommy reach school frm his home there are many places b/w their home and school connected by bidirectional paths u have to count no of different places he can cover from home to school condition is one place can't be visited twice and after reaching school he can't proceed further.
you have
given:-
Input
t
n m h s
m lines
Output:
count
t is  number of test case
n is number of nodes,m id number of bidirectional path, h is home and s is school
m lines bidirectional path b/w nodes x and y.
out put count is number of different nodes he can go from school satisfying the condition.
Sample Input:
1
3 3 0 1
0 1
1 2
0 2
Sample Output:
3

Tuesday, April 24, 2012

Three tips to succeed as a programmer

I Found its worth to read so thought to share.......

I've learned a lot of things over the years that I wish I knew before I graduated. From choosing the right job to figuring out where to focus in programming, here are three simple tips I’ve learned to help you as you embark on your career in software engineering.

1. Look for jobs that will let you program. 
You didn’t spend the past four years studying this field to stop now, right? You want your job title to be ‘software developer,’ ‘software engineer,’ ‘programmer,’ ‘coder’ or whatever other name describes exactly what you want to do.  So, make sure to steer clear of positions in marketing, testing, sales, etc. and seek out companies that are interested in hiring and mentoring you along your chosen career path.

2. Don’t give up on becoming a programmer.
Your education is only just about to begin.  After spending years obtaining a degree, brace yourself because the amount of time you’ll spend working on collaborative projects is where the real fun kicks in.  So far, you’ve probably been writing code, and that’s good. But to be a programmer, you need to learn how to read code. That’s the hard part because it requires you to understand, maintain, fix, and extend existing products.  You will have to become very good at reading code and deciphering what other programmers intended to do.

This will be frustrating and hard. You’ll feel like you’re not good at it, like the job is too difficult, like you could do so much better if you only rewrote everything from scratch. But it’s not too hard, and with practice, you will get better, and you will understand. Expect it to take time, and know that the rewards are certainly worth it - good programmers can change the world.

3. Learn how to take charge of your career.
Spend some time to figure out if you want to work on front-end code, back-end code, new product, or something else. Ideally, you’ll get to move around and learn from each unique position. So, if there’s some new and interesting opportunity to move, raise your hand and find your spark. People are not likely to come searching for you when great opportunities show up because there are probably going to be plenty of other people to choose from.

This can be hard, but you need to get out of the mindset that you are being pushy, demanding or somehow greedy when you do this. I’m not saying you need to trample over everyone around you and fight to the death, nor am I saying that you should demand to be given a new task. What I am recommending is that you find a way to politely indicate your interest and excitement about the opportunity to the right people- your boss, whoever is in charge of the opportunity, possibly the lead developer, etc. Find out how you could be a part of it and make the transition. The worst-case scenario is that you are told you are not quite ready; in which case you can work on figuring out what else is needed and be ready for the next opportunity that comes up.

Part of managing your career means taking a stock of your personal progress once or twice a year, especially early on in your career. Are you achieving your goals? Are you getting more complex tasks? Is your work increasing in scope and importance? If you notice yourself stagnating, take action right away. You don’t want to find yourself five years after starting your job still at the same level as a college new grad.

So, remember: learn how to read code, dedicate yourself to programming and manage your career.  Soon, you’ll be up and running in the programming world and making an impact.

Source: Goranka Bjedov is a capacity engineer on the Tech Ops team at Facebook. Goranka recently shared some of this advice at a computer science event with women from Mills College in Oakland, Calif.