DSR interview question

Algorith Interview: 1) calculate sum of nested array 2) two string might be the same or not, but elements rearranged, make code to find are they the same or not 3) class Stack {} const stack = new Stack{} stack.customPush(1); stack.customPush(2); stack.customPush(3); stack.customPop(); returns => 3 stack.customPop(); returns => 2