Print the lines with ERROR and the number of times it happened(count) in descending order

  • 0

    We have a file with following lines in it,we need to find all the lines with "Error" message the message and its count and print the messages in the descending order or count

    <4:02><ERROR><Error message1>
    <14:13><Error><Error message2>
    <10:03><Warning><Warning message1>
    <12:03><Warning><Warning message2>

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.