Message from @YourFundamentalTheorum

Discord ID: 507079025911398405


2018-10-30 03:16:40 UTC  

```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);
}
```

2018-10-30 03:16:56 UTC  

I'm pretty sure this one is just Nlog(N) but I might be wrong

2018-10-30 03:17:15 UTC  

idk I'll go try to figure this stuff out myself and come back if there's a problem

2018-10-30 03:17:16 UTC  

thanks

2018-10-30 03:17:28 UTC  

you're welcome

2018-10-30 03:47:39 UTC  

@ThisIsChris If there was only one call to two() rather than two calls, would that make it an O(n) function?

2018-10-30 03:48:00 UTC  

Since it just calls itself n times until it reaches the base case, and than calling itself twice each time

2018-10-30 05:57:25 UTC  

@Jacob yes

2018-10-30 06:18:18 UTC  

Thanks

2018-10-30 06:18:48 UTC  

so I guess the last function is O(n^2 log(n))

2018-10-30 06:19:59 UTC  

wait no

2018-10-30 06:20:05 UTC  

last one if O(n^2)

2018-10-30 06:20:24 UTC  

second one is O(n^2 log(n))

2018-10-30 06:20:39 UTC  

maybe that simplifies to something idk

2018-10-30 16:20:16 UTC  

@Jacob base case is f(1) = O(1)

2018-10-30 16:21:04 UTC  

for n > 1:
f(n) = f(n-1) + O(n)

2018-10-30 16:21:36 UTC  

so f(n) = sum over i from 1 to n of O(i)

2018-10-30 16:22:05 UTC  

sum of i from 1 to n of i = n*(n-1)/2

2018-10-30 16:22:16 UTC  

so f(n) = O(n^2)

2018-10-31 06:30:30 UTC  

^

2018-10-31 06:31:00 UTC  

you could also expand and see how much work is being done in each step

2018-10-31 06:31:26 UTC  

four(n) does a function call (O(1) not accounting for the recursion) and then prints n

2018-10-31 06:31:53 UTC  

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

2018-10-31 06:32:12 UTC  

that's another perspective that I use sometimes to calculate big Os

2018-11-09 06:22:51 UTC  

<@&435155896780324864> Lads, it's that time of week again

2018-11-09 06:22:57 UTC  

anyone online to help me with Java?

2018-11-09 06:23:34 UTC  

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.

2018-11-09 06:40:08 UTC  

false alarm guys, I figured out the problem

2018-11-13 01:45:17 UTC  

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?

2018-11-13 01:46:22 UTC  

I do!

2018-11-13 01:47:44 UTC  

What do you need help with specifically?

2018-11-13 01:49:06 UTC  

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?

2018-11-13 01:51:02 UTC  

I may reach out somewhere down the road thank you!

2018-11-13 01:51:05 UTC  

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.

2018-11-13 01:51:59 UTC  

Happy to help! Getting clients is fairly easy, especially with SEO work, though I would bundle it with email marketing too.

2018-11-13 01:54:52 UTC  

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

2018-11-13 01:56:01 UTC  

There’s a real need for digital marking in my area

2018-11-13 01:56:32 UTC  

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

2018-11-13 01:57:35 UTC  

Email has been my number one sales channel at every company. Both marketing and SDR outbound emails.

2018-11-13 01:58:47 UTC  

Then again, a good friend of mine runs a real estate marketing company that just does FB ads for local realtors. They do quite well.

2018-11-13 02:00:03 UTC  

Thanks that’s solid advice. I may incorporate the social media aspect once I get a foundation to fall back on. You’re right about people not caring about car dealership social media accounts lol.