quick python solution and headache for the rest of the day
def shift_matrix(matrix): arr = [i for row in matrix for i in row] print(arr) result = sorted(arr, key=lambda x: x == arr[-1], reverse=True)] return result m = [['d','u','d','e'], ['i','m','c','o'], ['d','i','n','g']] shift_matrix(m)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
quick python solution and headache for the rest of the day