What is higher order function?

Md Nur Hossain
@md.noor.hossain asked 3 years agoPlease explain the question
9 Answers

Abu Jakaria
@abujakariacse answered 3 years agoA higer order function is a function that take a function as a argument or return a function or do both that is called higher order function. Hope you understand.

Rakib
@rakib answered 2 years agoTesting

Rakib
@rakib answered 2 years agoReact.useEffect(() => {
if (firstRender) return
if (transition.state === 'idle' || transition.type === 'actionSubmission') return
setPendingPath(transition.location.pathname)
}, [transition.location])

Rakib
@rakib answered 2 years ago React.useEffect(() => {
if (firstRender) return
if (transition.state === 'idle' || transition.type === 'actionSubmission') return
setPendingPath(transition.location.pathname)
}, [transition.location])

Rakib
@rakib answered 2 years ago# Binary Search in python
def binarySearch(array, x, low, high):
# Repeat until the pointers low and high meet each other
while low <= high:
mid = low + (high - low)//2
if array[mid] == x:
return mid
elif array[mid] < x:
low = mid + 1
else:
high = mid - 1
return -1
array = [3, 4, 5, 6, 7, 8, 9]
x = 4
result = binarySearch(array, x, 0, len(array)-1)
if result != -1:
print("Element is present at index " + str(result))
else:
print("Not found")
Loading...
