What's the best way to implement a 2D interval search in C++?

blog-image1

We can make table scrollable by adding table-responsive class to it, but how can we loop it so that once the loop ends..

leave your comment


Comments (2)


  1. Raman

    This answer is going to be far less efficient than using explode(). I would not put this in any professional script. If it is possible for your incoming string to be empty, then write a simple falsey check before exploding instead of using a preg_ call containing a literal character. If a string might have a trailing delimiter and you don't want that, then just rtrim() the delimiter off -- again, no reason to lean on regex (and I love regex).

  2. Amit Kumar

    What if you want your parts to contain commas? Well, quote them. And then what about the quotes? Well, double them up.