Find Jobs
Hire Freelancers

Python Program - Local Peak and a Power calculator

$10-30 AUD

进行中
已发布超过 4 年前

$10-30 AUD

货到付款
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.
项目 ID: 21367529

关于此项目

2提案
远程项目
活跃5 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
2威客以平均价$23 AUD来参与此工作竞价
用户头像
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天之内
5.0 (43条评论)
5.8
5.8
用户头像
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天之内
5.0 (1条评论)
0.4
0.4

关于客户

AUSTRALIA的国旗
Truganina, Australia
5.0
4
会员自9月 20, 2019起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。