krish
BAN USER- -1of 1 vote
AnswersEnhancements to schema by adding another table lot
- krish in United States
SELECT *
FROM Amazon_lot p,
amazon_vehicles v
WHERE p.lotid= 1
AND p.lotid = v.lotid
AND v.vehicleid = 1;
-- was struck for a moment, Interviewer helped me with hint
SELECT count(1)
FROM amazon_residents r,
Amazon_lot l,
amazon_vehicles v
WHERE r.residentid = l.residentid
AND l.lotid = v.lotid
AND r.residentid = v.residentid
AND (v.vehicleid = 1
OR v.lotid = 2);| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersSQL Questions & Answers ,and followup questions
- krish in United States
given schema
Tables:
Residents:
resident_ID (num)
Apartment Number
Name
...etc
Vehicles:
vehicle_ID (num)
(FK): Resident_ID (num)
License Plate
Vehicle Size ("small", "large", "motorcycle"...)
Get all the residents who has vehicle size large
SELECT *
FROM amazon_residents res
WHERE EXISTS
( SELECT 1
FROM amazon_vehicles veh
WHERE veh.residentid = res.residentid
AND veh.type = 'large' );| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersFor a linked List p1 ->p2 ->p(n-1)->p(n) shuffle it to be p(1) -> p(n) ->p(2) ->p(n-1)....p(n/2)
- krish in United States| Report Duplicate | Flag | PURGE
Student freshers - 0of 0 votes
AnswerGiven the Java 8 Function interface:
- krish in United States
interface Function<T,R> {
R apply<T t>;
}
Provide code that will apply the composition of the following implementations and would have the type
Function<String, Integer>:
class GetBytes<String, byte[]> {
byte[] apply<String value> {
return value.getBytes<>;
}
}
class ArrayLength<byte[], Integer> {
Integer apply<byte[] value> {
return value.length;
}
}
If the input is “hello world” what would the expected result of the function be?| Report Duplicate | Flag | PURGE
Student freshers Algorithm - 0of 0 votes
AnswersFunction to find if the characters of the sample string is in the same order in the text string. They need not be
- krish in United States
consecutive.
Eg.. TextString: Redmond, Washington
Sample string :Rdd Waitn| Report Duplicate | Flag | PURGE
Student freshers Programming Skills
- krish December 03, 2016