Tag: algorithms
Given an array of numbers arr. A sequence of numbers is called an arithmetic progression if the difference between any two consecutive elements is the same. Return true if …
Given an array of unique integers salary where salary is the salary of the employee i. Return the average salary of employees excluding the minimum and maximum salary. Example …
Given the head of a linked list and two integers m and n. Traverse the linked list and remove some nodes in the following way: Start with the head …
Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, return the …
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. …