← Questions
Review a CSV-building function for correctness and performance bugs
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You are shown a short function (in Java or Python) that turns a table, a list of rows of string cells, into CSV text by appending to a string in a loop. Say what is wrong with its output and how it behaves on large exports, explain why, and give a fixed version. Expect to talk about escaping commas, quotes and newlines inside cells, trailing separators, and the cost of repeated string concatenation.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
