MSc thesis: Write-and-f-array: implementation and an application