Automatic time complexity Calculator
int i=1, s=1;
while(s<=n){
i++;
s+=i;
cout << "*"
}
Automatic time complexity Calculator
public static void sort012(int a[], int n)
{
// code here
int z=0,o=0,t=0;
if(a[i]==0) z++;
if(a[i]==1) o++;
if(a[i]==2) t++;
}
int k=z+o+t;
int i=0;
for(;i
Automatic time complexity Calculator
package NewPackage;
import java.util.HashMap;
public class AppleCodingQues {
public boolean isAnagram(String str1,String str2)
{
str1= toLowerCase(str1);
str2 = toLowerCase(str2);
return countCheck(str1).equals(countCheck(str2));
}
public HashMap countCheck(String str)
{
HashMap hs = new HashMap<>();
char[] arr = str.toCharArray();
for(int i=0;i
Automatic time complexity Calculator
n= 100
k= 0
for i in range(0, n):
k= 12
for j in range(0, n, 2)
k += 1
print(k)
Automatic time complexity Calculator
void function(int n){
int i=1, s=1;
while(s<=n){
i++;
s+=i;
cout << "*"
}
}
Automatic time complexity Calculator
s=0;
for (i = 0; i < n; i++)
for (j = 0; j < i; j++)
s++;
|