C++ Binary Search Help - Find #23

  • Context: C/C++ 
  • Thread starter Thread starter icanpartseas
  • Start date Start date
  • Tags Tags
    Binary Search
Click For Summary
SUMMARY

The discussion focuses on implementing a C++ binary search algorithm to find the 23rd odd number from a generated list of the first 100 odd numbers. Participants emphasize the importance of understanding binary search fundamentals and suggest resources for further learning, including Wikipedia and specific C++ algorithm notes. The advice includes compiling sample programs and conducting tests to solidify understanding of the algorithm.

PREREQUISITES
  • C++ programming language proficiency
  • Understanding of binary search algorithms
  • Familiarity with generating sequences in C++
  • Basic debugging and testing skills in C++
NEXT STEPS
  • Research "C++ binary search implementation"
  • Learn about "generating sequences in C++"
  • Explore "C++ debugging techniques"
  • Study "algorithm complexity analysis"
USEFUL FOR

Students learning C++, programmers seeking to enhance their algorithmic skills, and anyone interested in efficient searching techniques within arrays.

icanpartseas
Messages
1
Reaction score
0
I have to write a C++ binary search code where it generates the first 100 odd numbers and the search is used to the find the # 23 any help? I am ompletely lost
 
Technology news on Phys.org
If you are completely lost, you are either very modest, didn't go to class, or have no time to do your homework.
You would do well if you read up some background information and post a tentative solution at the appropriate forum for homework help:
https://www.physicsforums.com/forumdisplay.php?f=158

You could either Google "binary search", or try the following links:
http://en.wikipedia.org/wiki/Binary_search
http://www.fredosaurus.com/notes-cpp/algorithms/searching/binarysearch.html

After that, compile the sample program and do some tests. If you have questions about the algorithms, you can post here. For problems related to coding, you can post at the homework help site.

Good luck.
 

Similar threads

Replies
1
Views
1K
Replies
12
Views
3K
  • · Replies 57 ·
2
Replies
57
Views
6K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
6K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K