If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

List gaps between smallest and the biggest time interval

Started by ammusk354, 02-23-2023, 00:13:44

Previous topic - Next topic

ammusk354Topic starter

I had an php interview question and I am curious about the solution, maybe you can help me.

The problem sound like that :

There are many time intervals in this format 'ZZ-LL-AAAA'. I want to know if there are gaps between the smallest date and the biggest date from all the intervals.
List the gaps.

some example :

1) 01.01.2000 - 31.01.2000
2) 01.03.2000 - 31.03.2000
3) 15.01.2000 - 15.02.2000
gaps it will be 16.02.2000 - 28.02.2000 (or 29, if is bisect year)
HKR Trainings excel at providing you the best online classes with high quality facilities at a low price without any compromise on quality.
  •  



If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...