Every topic starts at New. Sign in and your practice counts.
There are two of errors and understanding these errors helps in developing accurate and effective problem-solving strategies.
Query : "Best smartphones for college students under 500"
Here, the user meant to exclude used phones but gets results including them, it has the logical error
so refine query will be
"Best new smartphones for college students under 500."
Still the user is getting irrelevant result due to syntax error of not writing the currency e.g PKR
So, the refine query will be
"Best new smartphones for college students under PKR 500."
Computational Thinking is a way of solving problems by using ideas from computer science.
-> Computing problem in computer science is one that is solved step-by-step through computation.
-) In decision problems normally 'yes-or-no' response is found in a choice
In search problems, the solution is made up by having a set of values that satisfy a certain criteria. Addition principle of counting is a basic idea for counting the total number of possibilities that can occur when dealing with many events or options that are mutually exclusive. The Multiplication Principle is used when we are dealing with many events, and we have to select one option from each event. A permutation is an arrangement of all the members of a set into a specific sequence or order.
A combination is a selection of items from a set where the order of selection does not matter.
-> The Pigeonhole Principle states that if more items are put into fewer containers than there are items, at least one container must contain more than one item.
-) The Principle of Inclusion and Exclusion calculates the size of the union of overlapping sets by adding the sizes of the sets and then subtracting the sizes of their intersections.
An algorithm is a well-defined, step-by-step procedure or set of rules for solving a specific problem or performing a task. Sorting is the process of arranging items in a specific order. Searching is the process of finding a particular item within a set. Logical reasoning is the basis for developing and evaluating algorithms, it is an essential part of computational thinking.
In Boolean, two statements or expressions are evaluated in a way that can only have one of two potential values as a result -either true or false. Bubble Sort: Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. Selection Sort: Divides the list into a sorted and an unsorted part, and repeatedly selects the smallest (or largest) element from the unsorted part to move to the sorted part.
Merge Sort: Divides the list into halves, recursively sorts each half, and then merges the sorted halves.