A bank transaction sheet is a list of transactions (deposits or withdrawals) for a given accoutn. The transactions in a sheet are ordered chronologically.
Write a function that combines multiple transactions sheets into one. The transactions in the output sheet must follow the same ordre as they appear in the original transaction sheets but there is no order between transactions across transaction sheets. The output transaction sheet should never reach a negative balance. If so, return None.
Input: List of Lists (sheets)
Ouput: List (of merged transaction sheet) or None
ex:
sheet1 = [100, 400, -1000, -500]
sheet2 = [-300, 2000, -500]
output = [100, 400, -300, 2000, -1000, -500, -500]