String search in file, remove duplicate lines, and sequence matching
Filed under Druva
The question
Wrote programs to find if a specific string is present in a file, remove duplicate lines from a log file using file handling and HashSet, and find the number of occurrences of the sequence 0,0,7 in an integer list allowing other numbers in between.
No write-up yet. Related questions below have one.
Related Druva questions
Collected from public candidate posts and coding forums. Updated Nov 2026.