Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

Tuesday common C++ interview problem: Largest covered interval. Given an array of integers, return the size of the largest interval that is fully covered by the values in this array. Solve it yourself: https://lnkd.in/dtg6gFG4 Solution: https://lnkd.in/dUuxyprK #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text
Kirill Lebedev

Samsung Moscow Research Center343 followers

2y

Are you sure about linearity of your solution? Seems quadratic.

Like
Reply

Hm....largest covered interval: does it mean an interval where we observe all numbers in increasing order without missed values?

Like
Reply
John Forsberg

BCS Financial Corporation485 followers

2y

Well, the high/low delta is 96 for sure. But doing a statistical analysis in QI Macros (dot plot, histogram) reveals two separate data sets. If you were a process or quality engineer, you might say you have two data sets that may be mixed. Certainly, we should question source of the data, how was it supplied or entered and is it valid? If you sort by color, the green group averages 3.5 and the 12 ends up with the other items over 90! Still looks like two groups of data from differing sources, but a 12 in the white coded data is an outlier. Data entry maybe, should it be a 92? Data is just data unless you question and analyze the sources!

  • No alternative text description for this image
Like
Reply
Srihari Kolli

Info Services1K followers

2y

96

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories