1.find maximum and second maximum in an array/list (implement a sorting algorithm, which will first sort the array)
1.1. Implement a sorting algorithm, which will first sort the array
1.2. If possible, the implementation should support different data types. (value types and reference types).
Implement the following function to Generate a List to CSV
public static string GenerateToCsv(this IList items, char seperator)
The following rules must apply:
Separate data fields with a delimiter, usually a comma. This should be a single character.
Keep each record on a separate line. Each record must start on its own line.
Do not follow the last record in a file with a carriage return.
In the first line of the file, include a header with a list of the column names in the file.
Make sure the header list is delimited in the same way as the rest of the file. This helps guard against the data fields being transposed in the data when it is loaded, which can lead to getting wrong answers when you query the data.
Remember that the enclosing character (double quotes) must be used when required, such as when the delimiter appears in a field.