Exclusive Time Of Functions | Leetcode 636
Автор: Pepcoding
Загружено: 2021-05-15
Просмотров: 10026
Описание:
Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. 1: On a single-threaded CPU, we execute a program containing n functions. Each function has a unique ID between 0 and n-1.
2: You are required to find the total execution time of each function.
3: You are given len number of logs, where logs[i] represents the ith log message formatted as a string "{function_id}:{"start" | "end"}:{timestamp}", telling start or end time of function with id function_id.
Note that a function can be called multiple times, possibly recursively.
Topic: #ExclusiveTimeOfFunctions #Leetcode636
Used #DataStructure: #Stack #Array
#TimeComplexity: O(n)
#SpaceComplexity: O(n)
--------------------------------------------------------------
Prerequisite:
1: Score Of Parentheses : • Score Of Parentheses | Leetcode 856
--------------------------------------------------------------
Linked Questions:
1. Exclusive Time Of Functions: https://www.pepcoding.com/resources/d...
--------------------------------------------------------------
Smimilar Questions:
1. Score Of Parentheses : https://www.pepcoding.com/resources/d...
---------------------------------------------------------------
For detailed information and other exercises, VISIT: www.pepcoding.com
Have a look at our result: https://www.pepcoding.com/placements
Follow us on our FB page: / pepcoding
Follow us on Instagram: / pepcoding
Follow us on LinkedIn: / pepcoding-education
----------------------------------------------------------------
#Stack #Array
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: