Skip to main content
8 of 8
edited body
dana
  • 2.7k
  • 1
  • 17
  • 12

C# (Visual C# Interactive Compiler), 123 bytes

a=>{var b="";for(dynamic i=0,e,f;i<a.Count;b+=a[i++]=f)foreach(var c in((e,f)=(b.ToList(),"")).f+a[i])f+=e.Remove(c)?"":c;} 

Try it online!

Anonymous function that outputs by modifying an input array.

// a: input array of strings a=>{ // b: cumulative letters var b=""; for( // i: loop index of string // e: copy of cumulative letters for manipulation // f: characters missing from current string dynamic i=0,e,f; // iterate over each string in a i<a.Count; // add missing letters of the day to // cumulative missing letters and // update array for output b+=a[i++]=f ) // iterate current string with character c foreach(var c in // tuplized variable assignment // e=b.ToList() // set e to a copy of the cumulative letters // f="" // initially there are no letters needed for the day ((e,f)= (b.ToList(),"")).f+a[i] ) // conditionally add c to missing letters for the day f+=e.Remove(c)?"":c; } 
dana
  • 2.7k
  • 1
  • 17
  • 12