JavaScript (Node.js), 51 bytes. a=>a.map((c,i)=>a[a[i]=a.lastIndexOf(c>'('&&-1)]=i). Try it online! Input an array of characters.
確定! 回上一頁