Brute Force Algorithm | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Brute Force Algorithm

what do you think about brute force algorithm in c++?

25th Nov 2016, 12:39 AM
notFound
notFound - avatar
3 Answers
+ 1
A brute force algorithm is a very straightforward way of solving a particular problem, such as sorting a data set. Brute force algorithms are good starting points in developing more efficient algorithms, such as selection sort compared to quicksort. Although both of these algorithms accomplish the same goal, the two are completely different in terms of how they accomplish said goal. Here is a list of some pros and cons of Brute force algorithms: Pros- •Easy to code and understand •Solves a problem; generates a solution •Stepping stone in the development of better algorithms. Cons- •Fairly inefficient, in both time complexity and space •Not very suitable in real world applications. A great read for more on algorithms would be Anany Levitin's Introduction to Design and Analysis of Algorithms. It can be complex in some areas but it is a good start!
27th Dec 2016, 4:28 AM
Greg Ortiz
Greg Ortiz - avatar
0
What's brute force algorithm?
25th Nov 2016, 12:14 PM
Mehdi Alikhan
Mehdi Alikhan - avatar
0
time consuming and inefficient and probably a good reason to appreciate other algorithms.
29th Dec 2016, 6:59 PM
Mehdi Ahmadian