Enterprise Software & Network Solutions interview questions | Glassdoor

Interview Questions

20,381

interview questions shared by candidates

Interview Questions

Sort: RelevancePopular Date

Sep 26, 2012

Linux Systems Administrator at Rackspace was asked...

Jan 28, 2012
 Can you write the code to generate the Fibonacci sequence?4 Answers#!/usr/bin/perl \$p = 0; \$n = 1; \$t = 0; for (\$i = 0; \$i < 50; \$i++) { printf "%d ", \$p; \$t = \$p + \$n; \$p = \$n; \$n = \$t; }HI, Thank you so much for posting this. I am going to have interview with Rack space for Linux system administrator Position. Can you please provide some question that has been asked by them so it will help me prepare for the interview. Thanks, VishalMy impulse is to use a temporary value holder as well, but I've seen a more elegant solution (in python). It's so pretty... l = 0 n = 1 print l for i in range(100): print n n = n + l l = n - lShow More Responsesthe best way is to use recursive call.. but if i was asked..i will probably end up with this def fab(): x = 0 y = 1 while y < 100: print x print y x += y y += x fab()

Software Engineer at NetApp was asked...

Dec 26, 2010
 Check if 2 strings are palindrome?4 AnswersI provided algorithm with O(n2) complexity. They he asked for optimizing it for speed. I gave another algorithm with O(nlogn) that involves mergesort of individual strings and then one-to-one comparison. Everyone can have their own algorithms and he wanted me provide algorithm as he had in his mind... he kept asking for O(n) solution that i could not completely provide in given amount of time...Just take reverse of any one of the strings and compare the rest and the string which is reversed. Theta(n) + Theta(n) = 2 * Theta(n) = Theta(n)char *str = "civic"; char* begin = str; char* end = str + strlen(str) - 1; int is_palindrome = 1; while ( begin < end ) { if ( to_upper(*begin) == to_upper(*end)) continue; else { is_palindrome = 0; break; } }Show More ResponsesThe above loop is incorrect in that the C99 function name is toupper and the while loop will spin forever - except for an empty or single character string - since the pointers being compared are never incremented / decremented. while ( begin < end ) { if ( toupper(*begin) == toupper(*end)) { ++begin; --end; } else { is_palindrome = 0; break; } } I also took out the "continue" since modern compilers are smart enough, even without optimization on, to know that if the first if conditional is true then the next code that should be executed is the conditional check in the while i.e. as opposed to generating a jump down past the else and then a jump back to the while conditional.

Apr 28, 2010

Support Engineer at A10 Networks was asked...

Nov 17, 2011
 If you have three people standing, all facing the same direction, each person can see the color of the hat of only the person directly in front of them (which can be either black or white). There are two hats of each color (four total). The hats are placed on the persons' heads one at a time, starting with the one in the very front. When someone knows for certain what color hat they have, they need to declare that they have discovered the color of their hat. In this scenario, no matter which hats are distributed, at least one person can be certain of their hat color. What are these scenarios, and what are the probability distributions for each?3 Answersthe person which is standing in MIDDLE can answer correct. the reason is,since the last person is not answering the colour of his hat,it means he can see two different colours of hats in front of him.so the person standing between them has to conclude that the colour of his hat would be just opposite of the person's hat,standing in front of him.samar's answer would be correct if the problem allowed each person to see hats being worn by *ALL* people in front of them. However, the original question posted said "each person can see the color of the hat of *ONLY* the person *DIRECTLY* in front of them." I think the original question was incorrectly worded. As it is stated, I don't think anyone can know the color of their hat, since nobody has more than one piece of information to start with.There is also the problem of assuming the hat are placed on the head of each in alternate colors otherwise, the last person would see 2 of the same color in front of him thus giving him the solution to his color, providing the person sees both person in front of him as well

Engineering at Arista Networks was asked...

Mar 7, 2012
 find the min value in BST4 AnswersLeftmost node is the one with the min value.node_t *min(node_t *node) { if (node == NULL) return NULL; if (node->left == NULL) return node; min(node->left); }tree_element_t *tree_get_min (tree_element_t *elem) { if (NULL == elem) return elem; if (NULL == elem->left) return elem; return (tree_get_min(elem->left)); }Show More Responsesint find_min (btree *node) { if (node == NULL) return (-1); while (node->left != NULL) node = node->left; return (node->data); } int find_max (btree *node) { if (node == NULL) return (-1); if (node->right != NULL) node = node->right; return (node->data); }

Engineer at MongoDB was asked...

Mar 5, 2012
 How much water is on the planet (earth)?4 AnswersGoogle itBasic science books may help here... about 70% of earth is filled with water. But, I guess the question is more geared towards your analytical skills...For a back-of-the-napkin estimate, you could look up the surface area of the oceans, and multiply that by the average depth. That might be good enough.Show More ResponsesNone of the answers given here are particularly helpful...look up 'fermi estimation' -- that is what the interviewer is looking for with a question like this.

Senior Software Engineer at Ariba was asked...

May 29, 2009
 find a loop in a list3 Answersuse two iterators, one iterates the list one at a time, the other iterates two items at a time. If there is a loop in the list, these two iterators will cross path at some point.the above is O(n^2), you can do much better. Single iterator plus a hash table (insert each value into hash table after searching for it in there). You get O(n).By "list", is this a linked list? I don't see what other type of list makes sense. Actually, I'm pretty sure it's not O(n^2). If there is a loop, the worst case is that it loops back to the last element (this means the faster pointer will take the longest to reach the slow pointer). By the time the slow pointer reaches the point in the list where it loops back, the fast pointer will have caught up to it. So it's O(n).

Staff Consultant at Capgemini was asked...

Jun 10, 2012
 If you were project manager and you and your team finished the project under budget, and had to decide what to do with the rest of the money left over, would you: Divide the money with your team equally Keep it Divide the money with your team with level of contribution and rank being the ones who receive the most3 AnswersNo wrong answer.Is the correct answer to split equally or by rank proportionally?No wrong answer, just a good explanation of why you chose it.

Senior Design Engineer at Oracle was asked...

Jan 12, 2011
 A key is broken on your laptop keyboard. How do you work around it until you can get a new keyboard?5 AnswersOn screen keyboard or copy-paste the letter.Plug in a spare USB keyboard in the office with the key that works.Since you are in design engineering, continue to submit your designs without that pesky letter and you can fix the problems later. Given the amount of buggy HW and SW that is being shipped from Oracle these days, my guess is that there are a number of design engineers with broken keyboards at Oracle.Show More ResponsesReport the problem to the helpdesk and then tell your boss that you can't work because your equipment is malfunctioning and you need to wait for a repair. Go home and surf open job postings and relax.Find a coworker who has an identical laptop. Swap the hard drive. The laptop will boot up no problem. When the coworker fixes the broken laptop, swap the hard drive back and that way the inventory system will not be compromised when it comes time to refresh your laptop.
3140 of 20,381 Interview Questions