✔️ C# - Simple to understand Efficient OOP Approach, With Comments
Thumbs up if you find this helpful \uD83D\uDC4D\n\nThe idea in this solution is to create two seperate lists that contais letter and digit logs. \n\nThis makes 
**Thumbs up if you find this helpful** \uD83D\uDC4D\n\nThe idea in this solution is to create two seperate lists that contais letter and digit logs. \n\nThis makes the sort go quicker since the digit logs dont need to be sorted.\n\nAn object is used to store the identifier, the contents, and the full log line of each log entry\n\nWe go through each line in the logs array and populate the letters and digit lists.\n\nAfter the letter and digit lists are populated, only the letter logs are sorted according to the requirements.\n\nOnce the sort is complete, the result is returned\n\n```\npublic class Solution {\n    \n    // Create a class to store the Log id, contents, and the full log line\n    private class Log {\n        public string id;\n        public string contents;\n        public string line;\n        \n        public Log(string line) {\n            var index = line.IndexOf(" ");\n            if (index > -1) {\n                id = line.Substring(0, index);\n                contents = line.Substring(index + 1);                \n            }\n            this.line = line;\n        }\n    }\n    \n    public string[] ReorderLogFiles(string[] logs) {\n        \n        // Create two lists, the letter logs and the digits logs\n        var letterLogs = new List<Log>();\n        var digitLogs = new List<Log>();\n        \n        // Go through each log line and determine if its a letter of digit log\n        foreach (var line in logs) {\n            \n            // Create a log object for this line\n            var log = new Log(line);\n            \n            // Determine if its a letter or a digit log by checking the last character\n            if (char.IsDigit(line[line.Length -1])) {\n                digitLogs.Add(log);                \n            } else {\n                letterLogs.Add(log);\n            }\n        }\n        \n        // Sort the letter logs\n        letterLogs.Sort((a, b) => {\n            // Sort by their contents\n            var cmp = string.Compare(a.contents, b.contents);\n            if (cmp != 0) {\n                return cmp;\n            }\n            \n            // If they are the same, sort by their identifiers\n            return string.Compare(a.id, b.id);\n        });\n        \n        // Create the result array using the size of both logs\n        var result = new string[logs.Length];\n        var resultIndex = 0;\n        \n        // Save the letter logs to the results\n        foreach (var log in letterLogs) {\n            result[resultIndex++] = log.line;\n        }\n        \n        // Save the digit logs to the results\n        foreach (var log in digitLogs) {\n            result[resultIndex++] = log.line;\n        }\n        \n        return result;\n    }\n}\n```
[]