Process Log Analysis

Company: Infosec_intern_flipkart(cybersec)

Difficulty: medium

Problem Statement

Process Log Analysis You are given a log in which every line records one event of one process. A line consists of one or more fields separated by a single space, and the first field of every line is the process name . The remaining fields (timestamps, codes, statuses and so on) vary from line to line and never matter for this task. Find every process name that appears on more than one line of the log, and print those names in ascending order , each name once. Complete the function solve(logs) . It receives the log lines in order, as strings, and returns the repeated process names in ascending order. Input Format The input consists of N lines, read until the end of input. Each line is one log entry: one or more fields separated by a single space, the first of which is the process name. Output Format Print each process name that appears on more than one line, one name per line, in ascending order. A name is printed only once, however many times it appears. Constraints 2 <= N <= 100