Code signal assignment

Array and String Manipulation Module Project

1 . buyAndSellStock :

You are given the prices of a stock, in the form of an array of integers, prices. Let's say that prices[i] is the price of the stock on the 'i^th' day (0-based index). Assuming that you are allowed to buy and sell the stock only once, your task is to find the maximum possible profit (the difference between the buy and sell prices). Note: You can assume there are no fees associated with buying or selling the stock.

2. validParenthesesSequence :

You are given a parentheses sequence, check if it's regular.

3. alphabeticShift :

Given a string, your task is to replace each of its characters by the next one in the English alphabet; i.e. replace a with b, replace b with c, etc (z would be replaced by a).