LeetCode Question · Apr 2024 · Los Angeles

Box | Phone interview | 2024

2 upvotes 224 views 3 replies

Question Details

You are given 100 log files each of size 1GB. in a few minutes how would you search through the log file for error code 500. > Expected unix...

Full Details

  1. You are given 100 log files each of size 1GB. in a few minutes how would you search through the log file for error code 500.

Expected unix commands as answer

  1. https://leetcode.com/problems/number-of-1-bits

  2. Top k largest elements : You are given a root directory and value k, the root directory has files and sub directories. Each file has one number on each line. Find the k largest elements from all the files in the root directory. (Not most frequent elements)

Gave a solution of parsing through sub directories in BFS style and adding elements to heap maintaing its size k

  1. Create a interfaces and classes for Deck of Cards
Free preview. Unlock all questions →

Topics

Graphs Heap