time complexity calculator online
int main() {
assert(1 < 0);
}
time complexity calculator online
int main() {
assert(1 < 0);
}
time complexity calculator online
for i = 1 to n
if i < 16
sum = sum + i
else
break
time complexity calculator online
void fun (int n)
{
if (n ≤ 0)
return;
printf (“*”);
fun(n-1);
fun(n/2);
}
time complexity calculator online
class Solution {
public:
int minStoneSum(vector<int>& piles, int k) {
int sum=accumulate(piles.begin(), piles.end(), 0);
while(k!=0){
int i=*max_element(piles.begin(),piles.end());
std::vector<int>::iterator it = std::find(piles.begin(), piles.end(), i);
int index = std::distance(piles.begin(), it);
int t=floor(piles[index]/2);
piles[index]=i-t;
sum=sum-t;
k--;
}
return sum;
}
};
time complexity calculator online
int F(int n,int m){
if(n==1)
return(n)
else
return F(n-1,m-1)*(n-2,m)
}
time complexity calculator online
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
a = 1;
b = 1;
while(b < n)
{
a += 1;
b += a;
cout<<"Hi";
}
}
time complexity calculator online
func eatChips(int bowlOfChips) {
Println("Have some chips!")
for chips := 0; chips <= bowlOfChips; chips++ {
// dip chips
}
Println("No more chips.")
}
func pizzaDelivery(int boxesDelivered) {
Println("Pizza is here!")
for pizzaBox := 0; pizzaBox <= boxesDelivered; pizzaBox++ {
// open box
[1]
[2]
[2]
[2]
United International University (UIU)
Dept. of Computer Science & Engineering (CSE)
Mid Exam Year: 2021 Trimester: Summer
Course: CSE 2217/CSI 227 Data Structure and Algorithms II,
Total Marks: 20, Time: 1 hour, Upload & Download: 15 min
2
for pizza := 0; pizza <= pizzaBox; pizza++ {
// slice pizza
for slice := 0; slice <= pizza; slice++ {
// eat slice of pizza
}
}
}
Println("Pizza is gone.")
}
time complexity calculator online
A = [1,2,3,4,5]
for i in A:
print(i)
time complexity calculator online
str1=input()
s=str1[-1::]
print(s)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us