Search over 10,000 free study notes
Over a million students use our free study notes to help them with their homework
Top answers
Find a given element m in a list of n sorted numbers, with time complexity O(log(n))
An implementation of the Binary Search algorithm will be sufficient. The algorithm works as follows:Position on the middle element in the list of numbers. If the current number is equal to the given number t...
VH
Answered by
Vlad H.
•
Computing tutor
1301 Views
Convert 10101101 from binary to both decimal and hexadecimal
Decimal : 173 Hexadecimal : AD
EB
Answered by
Emma B.
•
Computing tutor
3206 Views
A common construct found in many algorithms is a loop. Using pseudocode, write a pre-condition loop to output all of the even numbers between 99 and 201.
Key points when answering questions are the marks given for it and how the question is defined. In this example we need to write a pre-condition loop to output all the even numbers in the range (99,201) , an...
SA
Answered by
Stylianos A.
•
Computing tutor
3418 Views
Convert 'A1' hexadecimal value into binary.
Firstly split the number into 2 since there are two numbers. A and 1. We first convert 'A' into decimal. The corresponding value is 10. We then convert 10 into binary which is 1010. That is the first part of...
JL
Answered by
Jazir L.
•
Computing tutor
8812 Views
Write a function in pseudocode that determines if a given string is a palindrome
Declare and Initiate a new empty stringTraverse the given string using a loopTake each char from the given string and concatenate it to the beginning of the new stringCompare the final new string with the gi...
CV
Answered by
Charles V.
•
Computing tutor
2227 Views
←
11
12
13
14
15
→