This function checks whether a given string containing only '(', ')' and '*' characters is valid. A string is considered valid if it follows the rules defined above.

140

Dec 13
Given a stack of integers, the function returns the sum of the elements in the stack.

117

Dec 11
This function takes in a string consisting only of parentheses and outputs whether or not the string is balanced. A string is balanced if every open parenthesis has a corresponding close parenthesis and there are no unmatched parentheses.

155

Dec 10
This problem asks the programmer to return the sum of all integers at even indices in a given list. For example, given the list [1, 2, 3, 4, 5], the output would be 6 (2 + 4).

137

Dec 09
Given a simple expression string consisting of parentheses, plus/minus signs, and non-negative integers, implement a basic calculator to evaluate the string.

161

Dec 08
The function should return true if the stack is in sorted order (increasing order), and false otherwise.

117

Dec 06
This problem asks you to reverse a string using a stack. An example input and output is provided.

150

Dec 05
A stack is a data structure that supports push, pop, and min operations in constant time.

155

Dec 04