Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
136 views

Incremental upper bound in sorted range

Since initial question Increasing binary search for mismatch in sorted range contained defects in code and can confuse the readers, here is the updated version of the question. Is the code below ...
Damir Tenishev's user avatar
1 vote
1 answer
155 views

Inventory system codebase

I'm here looking for a review over my current code-base. Please: Ignore using namespace std; this is for educational purposes mostly so the usage of using namespace std; does not matter for this ...
ii69outof247's user avatar
4 votes
0 answers
70 views

Array Search Algorithm

Recently, I've been experimenting with an array searching algorithm that I'm not sure I've seen anywhere (minor references here). I'm still not fully-learned on how to state the efficiency of what I'...
Lapys's user avatar
  • 141
3 votes
2 answers
7k views

How to search for a word in a sorted text file efficiently?

I want to write my own program to search for a word in a sorted text file. In the text file each word is in one line. I want to write this myself because I did not find any simple program (without ...
Bernard's user avatar
  • 139
6 votes
1 answer
658 views

Is this implementation of binary search correct?

Is this implementation of binary search correct? Any special or edge cases that I missed out? Maybe it should be optimized for elements that are less than the first element of the array or greater ...
Desmond Hume's user avatar
3 votes
2 answers
871 views

UVA 10474 - "Where is the marble?" time limit

I have a problem from UVA online judge here. I have read it tons of times, and as they said, I have to get the answer really fast. I have used a binary search and ...
Giuseppe's user avatar
  • 133