Interview
Interview
Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that
they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same
element twice.
Example 1:
Output: [0,1]
Example 2:
Output: [1,2]
Example 3:
Output: [0,1]
Constraints:
You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once
you pay the cost, you can either climb one or two steps.
You can either start from the step with index 0, or the step with index 1.
Example 1:
Output: 15
Example 2:
Input: cost = [1,100,1,1,1,100,1,1,100,1]
Output: 6
Constraints:
Escribe sobre problemas de performance de BD que has tenido y que has corregido. ¿Qué
herramientas has usado?
reservation
reservationId int
dtCreated datetime
amount decimal(18,2)
currency varchar(3)
userIdCreatedBy int
user
userId int
name varchar(200)
● Elimina todas las reservaciones que fueron creadas antes de una fecha específica
● Regresa el nombre de todos los usuarios que tengan al menos una reservación el 12 de
enero del 2010
Usando las consultas anteriores, ¿qué índices agregarías a las tablas y por qué?