Software Engineer / Developer Interview Questions
- 0of 0 votes
AnswerImplement class Stack with help of only 2 queues,
i.e.:
- zr.roman November 19, 2015 in Russiaclass Stack<T>{ private Queue<T> _queue1; private Queue<T> _queue2; // public methods: Push, Pop, Peek, Count // private methods, if any. }
| Report Duplicate | Flag | PURGE
Software Engineer / Developer Algorithm - 5of 5 votes
AnswersAsked me to write an API. Then ask:
- joyfeng November 19, 2015 in United States
Consider how the API could support 3rd party applications which need to perform some logic based on the structure and content of a filter in a type-safe manner.| Report Duplicate | Flag | PURGE
unknown Software Engineer / Developer Java - 0of 0 votes
AnswerIt is part of a programming exercise.
- joyfeng November 19, 2015 in United States
Input is a combination of arbitrary complex filters. For example:
name = "smith" AND age > 9 OR Not(city = "New York")
It asks for a string representation, including the ability to generate and parse filters from the string representation. (you are not required to implement the string parsing logic since this could take too long)
Hint: give an example of a tree data structure.| Report Duplicate | Flag | PURGE
unknown Software Engineer / Developer Java - 0of 0 votes
AnswersFor a given string and dictionary, how many sentences can you make from the string, such that all the words are contained in the dictionary.
- Annonymous November 18, 2015 in United States
// eg: for given string -> "appletablet"
// "apple", "tablet"
// "applet", "able", "t"
// "apple", "table", "t"
// "app", "let", "able", "t"
// "applet", {app, let, apple, t, applet} => 3
// "thing", {"thing"} -> 1| Report Duplicate | Flag | PURGE
Uber Software Engineer / Developer Algorithm - 2of 2 votes
AnswersWhat is the fastest way to compute cube root?
- Ray November 14, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThe idea is their are "ticket stalls" with a certain number of tickets, say 9. Any ticket they sell is priced at the number of tickets that remain, so first ticket would be $9, second $8 etc...
- gdasara1@asu.edu November 13, 2015 in United States
You're given two lines of data, say:
2 4
1 5
The first row contains two numbers:
The number of stalls
How many tickets are sold
The second line contains a list of how many tickets each stall has initially, so in this case stall 1 has 1 ticket, stall 5 has 5 tickets.
The problem: what is the maximum amount of money you can make selling the given number of tickets?
In this case, you sell four tickets from stall two for a price of 5 + 4 + 3 + 2 = $14| Report Duplicate | Flag | PURGE
Citrix System Inc Software Engineer / Developer Algorithm - 2of 2 votes
AnswersThere is a circular train (the head is connected to the tail) where each car of the train contains a light bulb. Initially, the bulbs are randomly switched on/off.
- pavel.em November 04, 2015 in Germany
You need to determine the size of the train (the number of cars)
by going from one car to another and switching the light bulbs| Report Duplicate | Flag | PURGE
Yandex Software Engineer / Developer Algorithm - 2of 2 votes
AnswersGiven predicted stock prices for next n days for a stock e.g : 10, 30, 42, 15, 20, 50, 10, 25 find the maximum profit that can be made with a single buy-sell transaction. If no profit can be made return 0. In the example buying at 15 and selling at 50 gives maximum profit. Note that the two prices are neither minimum nor maximum in the array.
- Kiara October 27, 2015 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer - 0of 0 votes
Answersdesign a bit map of 16K bit
- capricornkmu October 17, 2015 in United States for Networking
get_bit, should get a free bit in this bit map
clear_bit, should clear a bit in this bit map| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Algorithm - 1of 1 vote
Answerswrite a program to toggle certain bits in a integer.
- capricornkmu October 17, 2015 in United States for Networking
Eg.
Inputs : int a, int start bit, int num_of_bits
if a is say 11111010110100000
if start = 6
num_of_bits = 4
output should be (starting 6th bit from right, toggle 4 bits)
11111010001000000| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answerswrite a program to count the 2 letter words in a sentence. Eg. "I am in love with New York" should return 2 (am and in).
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answersdesign routing table using trie
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Network - 0of 0 votes
Answerwhat are the advantages of IPV6 over IPV4 other than the scale advantage ?
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Network - 0of 0 votes
Answerwrite a program to find the number when a string is transformed to a palindrome, you can go from higher alphabet to lower alphabet and not the other way:
- capricornkmu October 17, 2015 in United States for Networking
Example:
to convert "abc" to palindrome, 'c' should be changed to 'a'. output should be 2 ('c' - 'a').| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answersfind bugs in the below program:
- capricornkmu October 17, 2015 in United States for Networking
void fn() {
int *i;
i = (int *) malloc (sizeof(int));
return;
}| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answerwrite a program to merge 2 linked list
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answersdefine how packet reaches from one host to another host. Eg. in topology "host1 - router A - router B - host2" what happens in different layers
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Network - 0of 0 votes
Answerswrite a program to delete the given node in a BST
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answerwrite to program to find the set bits in an integer
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer C - 0of 0 votes
Answershow traceroute works
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Network - 0of 0 votes
Answershow would you calculate path mtu
- capricornkmu October 17, 2015 in United States for Networking| Report Duplicate | Flag | PURGE
Hewlett Packard Software Engineer / Developer Network - 1of 1 vote
AnswersAn employee class has id, name and a vector of employees who reports him. Given two employees find the common manager of them.CEO pointer is provided.
- rsl October 10, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 1of 1 vote
AnswersYou are building a small command-line application to calculate hotel availability for a city. Your application reads in two (2) data files, and outputs its answer to STDOUT.
- amusing October 06, 2015 in United States
Your application will read in:
· a list of hotels along with how many rooms each contains (in no particular order)
· a list of bookings that have been made (in no particular order)
Your application will then print the list of all hotels which have availability for check-in and check- out date range, if any.
Do not worry about whether a specific room is available in a hotel for the entire booking period without switching rooms: availability is defined as the hotel having at least one (1) available room for each night of the target stay, regardless of whether it's the same room from day to day.
Data Files
hotels.csv
# Name, Rooms
Westin, 10
Best Western, 20
Hilton, 10
...
bookings.csv
# Name, Checkin, Checkout
Hilton, 2015-04-02, 2015-04-03
Hilton, 2015-04-02, 2015-04-04
Westin, 2015-05-01, 2015-05-20| Report Duplicate | Flag | PURGE
Booking.com Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a string and array of strings, find whether the array contains a string with one character difference from the given string. Array may contain string of different lengths.
Ex: Given stringbanana
and array is
[bana, apple, banaba, bonanza, banamf]
and the outpost should be true as banana and banaba are one character difference.
- kpraveen420 October 03, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Arrays String Manipulation - 0of 0 votes
AnswersYou are tasked with defining and implementing a function. as input, you are given an n x m matrix. x may appear any number of times in a matrix. your function should modify thebmatrix such that any row and column where x originally appears are completely over written with x
- annu025 September 30, 2015 in United States
For example:
- - - - -
- - - - -
- - - x -
x - - - -
- - - - -
Expected output:
x - - x -
x - - x -
x x x x x
x x x x x
x - - x -| Report Duplicate | Flag | PURGE
Software Engineer / Developer Matrix - 4of 4 votes
AnswersDesign and implement the constructor for the minesweeper game that takes in the dimension of the field and number of mines as input
- JSDUDE September 24, 2015 in United States| Report Duplicate | Flag | PURGE
Tableau Software Engineer / Developer Algorithm Object Oriented Design - 0of 0 votes
AnswersElevator system for a tall building
- JSDUDE September 24, 2015 in United States| Report Duplicate | Flag | PURGE
Tableau Software Engineer / Developer design - -1of 1 vote
AnswerGiven a collection of buildings determine the length of a skyline.
- JSDUDE September 24, 2015 in United States
Length of the skyline will be the line you draw over the top of the buildings in the skyline.
Remember you have to ignore the shorter buildings that get shadowed by taller buildings in front of them| Report Duplicate | Flag | PURGE
Tableau Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind the next value of a given value in a Binary Search Tree. Assume each node has reference to its parent
- JSDUDE September 24, 2015 in United States| Report Duplicate | Flag | PURGE
Tableau Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersConflict resolution in Multi Master systems.
- Kiara September 23, 2015 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer