Message from @ThisIsChris
Discord ID: 506865389465239552
```java
public void three(int n)
{
int i, j, k;
for (i = n/2; i > 0; i = i/2)
for (j = 0; j < n; j++)
for (k = 0; k < n; k++)
System.out.println("i: " + i + " j: " + j+" k: " + k);
```
This is the next one. Should be easier for me to figure this one out since it's just for loops, right?
yes
```java
public static void four(int n)
{
if (n > 1)
{
System.out.println(n);
four(n-1);
}
for (int i = 0; i < n; i++)
System.out.println(i);
}
```
I'm pretty sure this one is just Nlog(N) but I might be wrong
idk I'll go try to figure this stuff out myself and come back if there's a problem
thanks
you're welcome
@ThisIsChris If there was only one call to two() rather than two calls, would that make it an O(n) function?
Since it just calls itself n times until it reaches the base case, and than calling itself twice each time
@Jacob yes
Thanks
so I guess the last function is O(n^2 log(n))
wait no
last one if O(n^2)
second one is O(n^2 log(n))
maybe that simplifies to something idk
@Jacob base case is f(1) = O(1)
for n > 1:
f(n) = f(n-1) + O(n)
so f(n) = sum over i from 1 to n of O(i)
so f(n) = O(n^2)
^
you could also expand and see how much work is being done in each step
four(n) does a function call (O(1) not accounting for the recursion) and then prints n
if you expand that all the way, you'll see that it does n+(n-1)+(n-2)+...+2+1 print statements, which is O(n^2) as @ThisIsChris pointed out
that's another perspective that I use sometimes to calculate big Os
<@&435155896780324864> Lads, it's that time of week again
anyone online to help me with Java?
I have a program that converts infix expressions into postfix expressions. It worked for one expression, but didn't work for another. I don't know if exponents broke it or what.
false alarm guys, I figured out the problem
I’m thinking about doing freelance SEO work along with some other things in my relatively rural area working with small businesses. Anyone have experience with this sort of thing?
I do!
What do you need help with specifically?
Nothing as of yet I’m about to do up some marketing materials and try to get a couple of low risk customers to work on (car dealerships, private restaurants, etc) do you do this as work?
I may reach out somewhere down the road thank you!
I don’t do it anymore, no. I have 6 employees in my marketing department though and oversee everything there. Previously I ran marketing at a few startups and freelanced when I left university.
Happy to help! Getting clients is fairly easy, especially with SEO work, though I would bundle it with email marketing too.
Oh wow I’m strong on the sales side but I’ll have to build on my technical skills. I’m still in the brainstorming stage at the moment. It’s nice to know there is someone such as yourself in IE. I’m going to take your advice on the email marketing. Do you think social media should be a focus or is that too much to bite off at first
There’s a real need for digital marking in my area
That depends on the business. Generally I think it is better for local businesses to focus on email and SEO. The fact is, most people don’t want to follow the instagram account of their local car dealership