"SELECT
e1.empid AS manageremployee_id,
e1.empname AS managername,
COUNT(e2.empid) AS numberofdirectreports
FROM employees AS e1
INNER JOIN employees AS e2
ON e2.managerid = e1.empid
GROUP BY e1.emp_id
HAVING COUNT(e2.emp_id) >= 2
ORDER BY numberofdirectreports DESC, managername ASC
`"
Alvin P. - "SELECT
e1.empid AS manageremployee_id,
e1.empname AS managername,
COUNT(e2.empid) AS numberofdirectreports
FROM employees AS e1
INNER JOIN employees AS e2
ON e2.managerid = e1.empid
GROUP BY e1.emp_id
HAVING COUNT(e2.emp_id) >= 2
ORDER BY numberofdirectreports DESC, managername ASC
`"See full answer
"def findAlibaba(countOfRooms, strategy):
#countofrooms: num rooms
#listRooms rooms to look for alibabba
possiblePlaces = []
#initialize rooms
for i in range(countOfRooms):
possiblePlaces.append(True)
for i in range(len(strategy)):
roomToCheck = strategy[i]
#Room is marked as unavailable
possiblePlaces[roomToCheck] = False
#Next day calculatins
nextDayPlaces = []
for j in range(countOfRooms):
nextDayPla"
JOBHUNTER - "def findAlibaba(countOfRooms, strategy):
#countofrooms: num rooms
#listRooms rooms to look for alibabba
possiblePlaces = []
#initialize rooms
for i in range(countOfRooms):
possiblePlaces.append(True)
for i in range(len(strategy)):
roomToCheck = strategy[i]
#Room is marked as unavailable
possiblePlaces[roomToCheck] = False
#Next day calculatins
nextDayPlaces = []
for j in range(countOfRooms):
nextDayPla"See full answer
Engineering Manager
Coding
+1 more
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.
"SELECT COUNT(DISTINCT o.customerid) AS customers, d.departmentname
FROM orders o
INNER JOIN departments d
ON d.departmentid = o.departmentid
WHERE d.departmentname IN ('Electronics','Fashion') AND o.orderdate BETWEEN '2022-01-01' AND '2022-12-31'
GROUP BY d.department_name;
`"
Derrick M. - "SELECT COUNT(DISTINCT o.customerid) AS customers, d.departmentname
FROM orders o
INNER JOIN departments d
ON d.departmentid = o.departmentid
WHERE d.departmentname IN ('Electronics','Fashion') AND o.orderdate BETWEEN '2022-01-01' AND '2022-12-31'
GROUP BY d.department_name;
`"See full answer
"Determine the requirements
Perform basic checks on the frontend before submitting to the server
Length
Check for invalid or required characters
Client-side validation messaging
Perform more advanced checks on the server if required
Does the password include the user's name, etc
Handle server-side validation messaging"
Casey C. - "Determine the requirements
Perform basic checks on the frontend before submitting to the server
Length
Check for invalid or required characters
Client-side validation messaging
Perform more advanced checks on the server if required
Does the password include the user's name, etc
Handle server-side validation messaging"See full answer
"The best and average of both the algorithms is same which is O(nlog(n)), but the worst time complexity of QuickSort is O(n^2){a case where all the elements are sorted in opposite to the fashion/order you want} while the worst TC for merge sort remains the same O(nlog(n)).
and The SC for QS=O(logn) and MS=O(n)."
The_ A. - "The best and average of both the algorithms is same which is O(nlog(n)), but the worst time complexity of QuickSort is O(n^2){a case where all the elements are sorted in opposite to the fashion/order you want} while the worst TC for merge sort remains the same O(nlog(n)).
and The SC for QS=O(logn) and MS=O(n)."See full answer
"select a.playername as player1, b.playername as player2,
abs(a.level-b.level) as level_disparity
from players a
cross join players b
on a.playername < b.playername
where abs(a.level-b.level) <=5
order by level_disparity
`"
Gowtami K. - "select a.playername as player1, b.playername as player2,
abs(a.level-b.level) as level_disparity
from players a
cross join players b
on a.playername < b.playername
where abs(a.level-b.level) <=5
order by level_disparity
`"See full answer
"I walked through the code for a react.js based tic-tac-toe game written in typescript. The goal was to find ways to improve the code/ suggest improvements. I missed some areas like where state was being updated directly rather than using React's setState. There were issues around clear and maintainable logic, adherence to React best practices."
Natalie C. - "I walked through the code for a react.js based tic-tac-toe game written in typescript. The goal was to find ways to improve the code/ suggest improvements. I missed some areas like where state was being updated directly rather than using React's setState. There were issues around clear and maintainable logic, adherence to React best practices."See full answer