Find Jobs
Hire Freelancers

Python Program - Local Peak and a Power calculator

$10-30 AUD

Folyamatban
Kiadva ekkor: több mint 4 évvel ezelőtt

$10-30 AUD

Teljesítéskor fizetve
A) The function must be completed with time complexity O(log(N)). Find a local peak from an input unsorted array, a local peak is defined as any element i that is greater than element i+1 and i-1 (neighbouring elements in the list). The first and last element only have to be greater than their single neighbouring element to be a local peak. Return as output an integer representing the index of the element in the array that is a local peak, if multiple peaks exist, return the first found peak (ie. only return one peak) For example; Calling local_peak([0,2,4,6,5,2]) returns 3. B) The function must have a complexity of O(log(N)). You cannot use the inbuilt function Pow or the operator ** for this question. Write a function power(n, p) that takes a number and a power and returns the number raised to that power For example; Calling power(2,8) returns 256.
Projektazonosító: 21367529

A projektről

2 ajánlat
Távolról teljesíthető projekt
Aktiválva: 5 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
2 szabadúszó adott átlagosan $23 AUD összegű árajánlatot erre a munkára
Felhasználó avatár
Hello, I went through your requirement specification and I can help you design both functions in Python in O(log(N)) complexity of time space. Please feel free to contact me to discuss further. Regards, Sunny
$30 AUD 2 napon belül
5,0 (43 értékelés)
5,8
5,8
Felhasználó avatár
Hi, I have 10 years of working experience in python development and can easily handle your project please inbox me so we can discuss further looking forward to work with you.
$15 AUD 1 napon belül
5,0 (1 értékelés)
0,4
0,4

Az ügyfélről

AUSTRALIA zászlója
Truganina, Australia
5,0
4
Tagság kezdete: szept. 20, 2019

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.