We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f09aac commit 79c7187Copy full SHA for 79c7187
scripts/algorithms/E/Exclusive Time of Functions/Exclusive Time of Functions.cpp
@@ -1,3 +1,4 @@
1
+// Runtime: 35 ms (Top 53.02%) | Memory: 13.1 MB (Top 84.47%)
2
class Solution {
3
public:
4
vector<int> exclusiveTime(int n, vector<string>& logs) {
@@ -13,10 +14,10 @@ class Solution {
13
14
auto diff = time - st.top().second + 1;
15
ret[st.top().first] += diff;
16
st.pop();
- if (!st.empty())
17
+ if (!st.empty())
18
ret[st.top().first] -= diff;
19
}
20
21
return ret;
22
-};
23
+};
0 commit comments