Hone your skills with algorithmic problems, SQL queries, debugging exercises, and output predictions with live test runners and step-by-step explanations.
Given an array of integers `nums` and an integer `target`, return indices of the two numbers such that they add up to `target` in O(n) time.
Write a function that reverses an array of characters in-place using O(1) extra memory.
Given a string `s` containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Write an SQL query to report the second highest salary from the Employee table. If there is no second highest salary, the query should report NULL.
Create a function `createCounter(init)` that returns an object with `increment()`, `decrement()`, and `reset()` methods maintaining internal encapsulated state.