Skip to content

Instantly share code, notes, and snippets.

@aragorn2308
aragorn2308 / minimum_clock_time.cpp
Last active February 17, 2018 18:10
Find the minimum time in HH:MM:SS format given a string of 6 digits.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char strings[1000][7];
int comparator(const void *p, const void *q)
{
int l = *((char *)p);
int r = *((char *)q);
return (l - r);
}