We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b884809 commit c0fe573Copy full SHA for c0fe573
scripts/algorithms/M/Minimum Time Difference/Minimum Time Difference.cpp
@@ -1,3 +1,4 @@
1
+// Runtime: 156 ms (Top 5.09%) | Memory: 13.4 MB (Top 68.16%)
2
class Solution {
3
public:
4
int findMinDifference(vector<string>& timePoints) {
@@ -7,7 +8,7 @@ class Solution {
7
8
if(st.count(i)) return 0;
9
st.insert(i);
10
}
- int ans = INT_MAX;
11
+ int ans = INT_MAX;
12
int first = -1,prev = 0; // first variable will take the diffrence of the first time stamp given in the input and 00:00
13
int hour = 0, minute = 0;
14
while(hour<24)
@@ -36,4 +37,4 @@ class Solution {
36
37
ans = min(first+prev,ans);
38
return ans;
39
-};
40
+};
0 commit comments