None Interview Questions
- 0of 0 votes
AnswersCan we write a Fixed LOD inside a Fixed LOD.
- 11gupt October 10, 2020 in United States| Report Duplicate | Flag | PURGE
Tableau None Data analysis - 0of 0 votes
AnswersThere is Tableu dashboard on Production server and you dont have access to it. You have this dashboard with staging data(not production data). This dashboard has performance issue. How will you fix this problem.
- 11gupt October 10, 2020 in United States| Report Duplicate | Flag | PURGE
Tableau None Data analysis - 0of 0 votes
Answera matrix contains positive integer numbers.
- amitaiweil February 03, 2020 in United States
Each column and row, which contains zero should be reset all to 0.
(The reset column/line should be skipped while iteration)
Is there a way in C for doing this without using another temp full array for knowing where the zero's which have been found exist?| Report Duplicate | Flag | PURGE
None None C - 0of 0 votes
AnswerGiven the below input and ouput.
- sarunreddy82 March 05, 2018 in United States
Input :
String[] input = {"hello", "world"};
output: (Higher count should come before and natural order)
hello : l=2, e=1,h=1,o=1
world: d=1,l=1,o=1,r=1,w=1| Report Duplicate | Flag | PURGE
xyz None Arrays - 0of 0 votes
AnswersImplement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
My version of code is this,static boolean giveresult(String s) { boolean answer=true; for(int i=0;i<s.length();i++) { char x = s.charAt(i); if(s.substring(i+1).contains(x+"")) {answer=false; break; } } return answer; }
Can I know what would be the time complexity.?
- studentharsha July 05, 2017 in United States| Report Duplicate | Flag | PURGE
N/A None - 0of 0 votes
AnswerImplement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
- studentharsha July 05, 2017 in United States
My version of code is this,
static boolean giveresult(String s)
{
boolean answer=true;
for(int i=0;i<s.length();i++)
{
char x = s.charAt(i);
if(s.substring(i+1).contains(x+""))
{answer=false;
break;
}
}
return answer;
}
Can I know what would be the time complexity.?| Report Duplicate | Flag | PURGE
N/A None - 0of 0 votes
Answersan array contains number in range 1 to n and having a number missing and a number repeat twice find both numbers
- manas019283 February 25, 2015 in India| Report Duplicate | Flag | PURGE
None Student Algorithm - 1of 1 vote
Answersgiven a string without space "iamstudent" output "i am student" u are provided with a dictionary to check words
- manas019283 February 25, 2015 in India| Report Duplicate | Flag | PURGE
None Student Algorithm - 1of 1 vote
AnswersYou have just earned $500 voucher to spend at any restaurant. However,
since you are a programmer and a foodie you want to maximize how you
allocate your money.
Attached is CSV that has a list of:
-Beverages
-Appetizers
-Entrees
-Desserts
-Restaurants
The CSV file looks something like
Beverage Name,Beverage Cost,Beverage Value,Appetizer Name,Appetizer Cost,Appetizer Value,Entrée Name,Entrée Cost,Entrée Value,Desert Name,Desert Cost,Desert Value,Restaurant Name,Restaurant Drink Cost,Restaurant Value
7up, $92.00 ,32,Fresh Rolls, $82.00 ,30,Fried Rice, $78.00 ,29,Vanilla Ice Cream, $76.00 ,13,Applebee's, $43.00 ,19
Sprite, $89.00 ,24,Spring Rolls, $54.00 ,18,PB & J, $49.00 ,29,chocolate cake, $50.00 ,25,Arby's, $26.00 ,5
Next to each item there is a cost and a perceived value.
Your job is to construct a meal under your budget of $500 that includes:
1 Beverage
3 Appetizers
2 Entrees
1 Dessert
1 Flex Option (This can be an Appetizer, Entree, or Desert)
1 Restaurant
1. Please list the 25 Combinations with the highest perceived value
given your budget
2. Please list the 25 Combinations with the lowest perceived value
given your budget.
Make sure your program assumes that the number of items in each
category is N
The problem I am having is using the knapsack algorithm in this case, especially with item constraints. The problem seems to be poorly written.public static void main(String[] args) throws IOException { File file = new File("Menu.csv"); List<String> lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8); List<Beverage> beverages = new ArrayList<>(); List<Appetizer> appetizers = new ArrayList<>(); List<Entree> entrees = new ArrayList<>(); List<Dessert> desserts = new ArrayList<>(); List<RestaurantDrink> restaurantDrinks = new ArrayList<>(); boolean firstLine = true; for (String line : lines) { if (firstLine) { firstLine = false; continue; //don't care about first line } String[] array = line.split(","); int j = 0; Beverage b = new Beverage(); Appetizer app = new Appetizer(); Entree e = new Entree(); Dessert d = new Dessert(); RestaurantDrink rd = new RestaurantDrink(); for (String a : array) { switch (j) { case 0: if (!a.equals("")) //nothing { b.name = a; } break; case 1: if (!a.equals("")) //nothing { b.cost = Double.parseDouble(a.replace("$", "")); } break; case 2: if (!a.equals("")) //nothing { b.perceivedValue = Integer.parseInt(a); beverages.add(b); } break; case 3: app.name = a; break; case 4: app.cost = Double.parseDouble(a.replace("$", "")); break; case 5: app.perceivedValue = Integer.parseInt(a); appetizers.add(app); break; case 6: e.name = a; break; case 7: e.cost = Double.parseDouble(a.replace("$", "")); break; case 8: e.perceivedValue = Integer.parseInt(a); entrees.add(e); break; case 9: d.name = a; break; case 10: if (a.equals("")) //free dessert { d.cost = 0.00; } else { d.cost = Double.parseDouble(a.replace("$", "")); } break; case 11: if (a.equals("")) //free dessert { d.perceivedValue = 0; } else { d.perceivedValue = Integer.parseInt(a); } desserts.add(d); break; case 12: rd.name = a; break; case 13: if (a.equals("")) //free restaurant drink { rd.cost = 0.00; } else { rd.cost = Double.parseDouble(a.replace("$", "")); } break; case 14: if (a.equals("")) //free dessert { rd.perceivedValue = 0; } else { rd.perceivedValue = Integer.parseInt(a); } restaurantDrinks.add(rd); break; } j++; } j = 0; } }
is all I got. I'm just having trouble with the knapsack portion.
- Johnb December 03, 2014 in United States| Report Duplicate | Flag | PURGE
Hired.com None None Algorithm - 0of 0 votes
AnswerIn Linux, we use virtual address.So each process will think it has 4 GB
- tutubabyjun January 25, 2014 in United States for power
memory space even if the real memory is only 2GB. Now suppose we do not have
MMU and programmer use real physical address in their program. We only have
small size of physical memory. How can we design the system?| Report Duplicate | Flag | PURGE
NVIDIA None None - 0of 0 votes
AnswersWe run two video game benchmarks on our new designed SOC. The two
- tutubabyjun January 25, 2014 in United States for power
benchmarks have the same instruction set. The benchmark with higher power
consumption always work well while the other one always get stuck. What can
be the problems?| Report Duplicate | Flag | PURGE
NVIDIA None None - 0of 0 votes
AnswersIn the new mobile phone, we can either choose to use a 1GHz solo core or
- tutubabyjun January 25, 2014 in United States for power
500MHz duo core processor. What tradeoffs should we consider?| Report Duplicate | Flag | PURGE
NVIDIA None None - 4of 4 votes
AnswersTwo tables. Country and City
- sunny smart June 16, 2013 in Netherlands
country --> countryid, country name
city --> countryid, city name
1. how do you get the countries that has no cities?
2. how do you get the countries that has less than 3 cities and also make sure the countries with no cities also show up.| Report Duplicate | Flag | PURGE
Booking.com None None Database SQL - 0of 2 votes
AnswersSuppose you are appointed as a Database Administrator in a well reputed organization. Database in that organization is completely indexed. However, it has been noted that query performance of retrieval operations are good, but “write” operations are creating overhead.
- bc080400250@vu.edu.pk February 11, 2013 in - for pk
Your task is to improve the performance in the given perspective. There might exist different ways to solve this problem. Discuss the solution with strong arguments| Report Duplicate | Flag | PURGE
None None - -3of 3 votes
AnswersYour company has got a project for developing a software system. A similar software system was developed in your previous company. You discover that your company's interpretation of requirements is different from the interpretation taken by your previous company. Cost of project will tremendously increase if ambiguities in requirements are not resolved. You have also an ethical responsibility of confidentiality to your previous company. Discuss what you should do in such a situation? not please give me answer in a few hours that i submit my topic at time
- bc080400250@vu.edu.pk February 11, 2013 in - for pk| Report Duplicate | Flag | PURGE
None None - 0of 0 votes
AnswersA queue is implemented using a circular list. If only one pointer is given to which node a pointer p should point such that enqueue and dequeue operation could be performed in o(1).
- Saabu October 13, 2012 in India
options are
1) Rear
2)Front
3)Node next to front
4) one more option was there| Report Duplicate | Flag | PURGE
Amazon None None Algorithm - 0of 0 votes
AnswersThere are three operations on a stack. push, pop and one extra operation reverse that will reverse the element in stack. Using this we have to implement a queue. so for Enqueue and Dequeue operations how many operations on stack are needed.
- Saabu October 13, 2012 in India
options are
1) 3,3
2) 1,1
3)1,3
one more option was there i don't remember| Report Duplicate | Flag | PURGE
Amazon None None Algorithm - 0of 0 votes
AnswersAgain part of "coding" test for non-programmers
- amazon August 10, 2012 in United States
What number is non-standard if standard means all integers.
Answers included 99, -0. 11.2, and -16. Unsure if -0 is an integer. No answer was an option as well.
Edit: that non-standard was not in the original question. I do not recall the question exactly, but it revolved around whether -0 is an integer.| Report Duplicate | Flag | PURGE
Epic Systems None None Brain Teasers - 1of 3 votes
AnswersA program removes all non-numeric characters until it reaches a second non-numeric and then stops. "+3.4"=3
- amazon August 10, 2012 in United States
What would result when "1.2" was entered?
1 was not an option. 1.2 was not.
No answer was an option. Chose no answer.
I did pass the test with many "no answers".| Report Duplicate | Flag | PURGE
Epic Systems None None - 0of 0 votes
AnswersWhich is a true statement?
- amazon August 10, 2012 in United States
if both true, A&B=True
A&B=False if only one false
A^B=True if only one True
Which of these 5 is not true? The all seemed fairly obvious except
1) A&B^C
2) 8&0+0=0
3 others I forgot
One was a math problem without an =
the challenge was not the logic but whether
one can classify an equation with 0=0 or answer 8 as
true or false.
No answer was available.
Updated| Report Duplicate | Flag | PURGE
Epic Systems None None Brain Teasers - 0of 0 votes
AnswersWhat is the remainder of normal fraction?
- amazon August 10, 2012 in United States
# = Modulo
Several problems used the # symbol defined as
the remainder 4 / 3 =1
One question asked 3 /4 another 1/2
another had 0/0
You had to know not only modulo but whether it
is usable for a normal fraction.
Please update if you take the test
update| Report Duplicate | Flag | PURGE
Epic Systems None None Brain Teasers - 0of 0 votes
AnswersPart of coding test for non-programmers.
- amazon August 10, 2012 in United States
‘ means not. It converts a character to null in a string but converts the character to 0 in an operation
1=John 2= Jane 3= Does
“’123” = ?
Jane3Does was the closest answer. It seemed wrong because of the 3 in there.
I'm sorry i forgot the other answers, but they were
equally illogical.| Report Duplicate | Flag | PURGE
Epic Systems None None Brain Teasers - 1of 1 vote
Answers‘ means not. It converts a character to null in a string but converts the character to 0 in an operation
- amazon August 10, 2012 in United States
‘5 means null whereas ‘5+1=1
Which one of these is true?
Cannot recall the options; they all appeared false.
I put the last option, but couldn’t figure it out.
‘(‘5)=0?| Report Duplicate | Flag | PURGE
Epic Systems None None Behavioral - 0of 0 votes
AnswersPart of coding test for non-programmers.
- amazon August 10, 2012 in United States
Holy Water is concatenated by “Holy “.”Water” or “Holy”.” Water” Watch the space.
How would you spell "Holy water" given “Holy”=God and HOH=”Water”.
1) God.HOH
2) God.” “.HOH
3) God”.” HOH
4) Forgot others| Report Duplicate | Flag | PURGE
Epic Systems None None Brain Teasers