Queries With Fixed Length Hackerrank Solution