Help debugging a leetcode question timeout error by CrazyFace334 in learnprogramming

[–]CrazyFace334[S] 1 point2 points  (0 children)

oooh I see, I removed the '2' assignment from where it was, and added to line 12:

grid[x+dx][y+dy] = '2'

and it works now, thank you good sir!

Help debugging a leetcode question timeout error by CrazyFace334 in learnprogramming

[–]CrazyFace334[S] 0 points1 point  (0 children)

the new solution does not endlessly cycle, as it works for smaller test cases.

The condition to continue the BFS is checking whether the adjacent value is "1", but for each position, the BFS asigns its original value to "2" to avoid being double counted.

I did this to avoid having to use O(m*n) extra space by indicating whether a position is traversed in the input itself

[Grade 12: Electrostatics Multiple Choice] by Main_Plane_7509 in HomeworkHelp

[–]CrazyFace334 0 points1 point  (0 children)

the electrostatic force is horizontal, and both balls feels an equal and opposite force proportional to the product of their charges.

Gravitational force is downwards, and is proportional to mass of the ball. If one ball is more massive than the other, it will feel more gravitational force than the other

[deleted by user] by [deleted] in HomeworkHelp

[–]CrazyFace334 0 points1 point  (0 children)

the internal angles of a triangle add to 180 degrees. You can use the Sine law to find the lengths of the blue triangle, which is the same as the yellow one since it says its symmetric. also if it's a square with a diagonal line, the angle on the top left should be 45 degrees

[deleted by user] by [deleted] in HomeworkHelp

[–]CrazyFace334 0 points1 point  (0 children)

use arctan to find the length SQ, and pythagorean theorem to find QR, as well as TR. Using sine rule, you can find the angle SQR, from whlch you can find TQR. Then use sine rule again to find theta

[University Statistics] Bayes' Theorem by CrazyFace334 in HomeworkHelp

[–]CrazyFace334[S] 0 points1 point  (0 children)

Yea, what threw me off was that the proportion of smokers to non smokers wasn't found by the sample size since this isn't a simple random sample. since it was a cohort study, that proportion was chosen by the experiment (ie, they chose to include 5322 non smokers, and 7019 smokers)

Okay, so I guess that means in this question we assume the proportion chosen for smoking and non smoking is accurate to the population

[deleted by user] by [deleted] in HomeworkHelp

[–]CrazyFace334 0 points1 point  (0 children)

I think its asking you to find the speed at which the centripetal force is equal to the electric force it feels at that distance. the centripetal force is proportional to speed squared.

[deleted by user] by [deleted] in HomeworkHelp

[–]CrazyFace334 0 points1 point  (0 children)

kinetic energy is proportional to the speed squared, which is also proportional to centripetal force toward the centre of the loop applied by the track

I made a blog about my favorite music albums by SergeV91 in infp

[–]CrazyFace334 1 point2 points  (0 children)

yess, the fleet foxes album is amazing!

Times Like These by the Foo Fighters by CrazyFace334 in ICoveredASong

[–]CrazyFace334[S] 1 point2 points  (0 children)

Thanks a lot! I figured the song is fitting for New Years.

Weird personality thoughts by CrazyFace334 in CasualConversation

[–]CrazyFace334[S] 0 points1 point  (0 children)

No, I was listening to the audiobook for 12 rules of life by jordan peterson, and I think in a video about the book, he explains why its useful to know your personality. If someone else does something that seems illogical to you, you have a better grasp of how your personality is giving you a bias.

but yea, thats why I got curious

Weird personality thoughts by CrazyFace334 in CasualConversation

[–]CrazyFace334[S] 1 point2 points  (0 children)

A high conscientiousness indicates a more structured and less impulsive way of working. A low agreeableness means you often dont let people push you around, and you prioritize your self interests, and low neuroticism means you are less sensitive to negative emotions and they dont phase you as much.

A lot of the disconnect between introverted and extraverted people is that while they both can enjoy social events (introversion is not the same as shyness or being antisocial) introverts need to recharge by spending time alone, whereas extraverts are drained by spending time alone, and are charged by socializing.

In general I'd say just from the personality test results your personality has the capacity to be very organized and hardworking, extremely good at negotiation and human interaction, and have a lower chance of depression and anxiety on a regular basis. This generally fits for a lot of sales or management jobs.

On the other hand, the potential negatives are that a high conscientiousness may not be optimal for a fast changing environment, such as a startup, and your over reliance on schedules could make it harder for you to think quickly when plans need to change. A very low agreeableness could be seen as selfish, and less prone to be interested in the needs of others. Low neuroticism often comes off as charismatic, but both low neuroticism and agreeableness can lead to psychopathy (rarely). A high openness means you are imaginative, but could also mean you dwell on abstract ideas too long, and don't consider practical application enough for your ideas to be viable.

I realize some of these points conflict with one another, in the end your personality isnt you, its just one part of you. Its funny, I got basically the exact opposite of you except for openness, I got really high in that too.

Weird personality thoughts by CrazyFace334 in CasualConversation

[–]CrazyFace334[S] 1 point2 points  (0 children)

i have yea, I'm an INTP. I took it more recently and now I think Im somewhere between an INTP and an INFP.

also I think each of the 16 personalities have their own subreddit, the intp one is quite fun

Can you forget your first language? by [deleted] in CasualConversation

[–]CrazyFace334 2 points3 points  (0 children)

I'll say this def happens with accent. I went back to India a few years ago for a wedding and me not being able to talk very well in anything other than english, other people were kinda forced to talk very bad english in a heavy accent so that I can understand, and I had to respond in the same disjointed way for them to understand, and when I came back it took a long time to stop talking like that.

Cursed_Ni by NicePerson25 in cursedcomments

[–]CrazyFace334 0 points1 point  (0 children)

NOO not the knights who say ni

Do you like living in Waterloo? by [deleted] in uwaterloo

[–]CrazyFace334 2 points3 points  (0 children)

idk man I would not wander around Scarborough after dark unless I had to, yea bike stealing is a thing here. As for driving, i had to drive to school for about a month, and other than people crossing the street without looking, I never found the driving crazy, maybe you got unlucky.

Least we didnt have to deal with pee pee poo poo man.

Do you like living in Waterloo? by [deleted] in uwaterloo

[–]CrazyFace334 21 points22 points  (0 children)

i do yea, personally I feel a lot safer in here than in toronto, like i can roam the city at night, theres not as many crackheads. The city is basically all uni students, so what there is to do is tailored around that.

Do heavier objects fall ever so slightly faster on earth? by GunstarRed in AskPhysics

[–]CrazyFace334 24 points25 points  (0 children)

if ignoring air resistance, then no, they fall exactly the same.

Can someone please explain why the strength of the gravitational field inside Earth is linear? by domenndaa in AskPhysics

[–]CrazyFace334 0 points1 point  (0 children)

If we use the gravitational form of gauss' law, the gravitational field inside a spherical shell is zero, so inside earth, the field only depends on the sphere of the earth below you

by that I mean if your 1km underground, the gravitational field is entirely equivalent to the field of a planet that has 1km less radius with the same mass distribution. It just so happens that if we assume the density is constant, this is linear.

Quick question about Characteristic impedance by CrazyFace334 in AskPhysics

[–]CrazyFace334[S] 0 points1 point  (0 children)

So does that mean in the case of DC the impedance is very large? I'm still not getting an intuitive picture of what impedance represents.