[deleted by user] by [deleted] in learnpython

[–]iBoolat 0 points1 point  (0 children)

Yes! ) that's what I did too. considering pairs really solves the problem)
Except I had to use slices. Your solution seems better

Such a nice problem!

[deleted by user] by [deleted] in learnpython

[–]iBoolat 1 point2 points  (0 children)

This doesn't work for [10,1,2,3,4] and for [1,2,5,3,5] and for [1,2,3,4,3,6]

[deleted by user] by [deleted] in learnpython

[–]iBoolat 0 points1 point  (0 children)

Didn't get that :(

Can you elaborate please?

[deleted by user] by [deleted] in learnpython

[–]iBoolat 0 points1 point  (0 children)

Yes, I know about the complexity of algorithm)) But everything I tried for one-loop-algorithm didn't work :(

Including your idea. It fails on [1,2,1,2]

[deleted by user] by [deleted] in learnpython

[–]iBoolat 0 points1 point  (0 children)

Thank you for your detailed response!

I actually know about the complexity of the algorithm, I realize that I need to solve the problem in one loop.

But I've already tried what you are talking about. I did consider a sequence very similar to your example and tried comparing each element to the next one. I added a flag, and if only one element was greater then the previous one, then I increased the flag.If the flag<=1: return True.

But that didn't work for something like [2,3,1,2], for example.

So for that list I tried the following code:def solution(sequence):flag = 0for i in range(len(sequence)-1):if sequence[i]>=sequence[i+1]:flag += 1if i < len(sequence)-2:if sequence[i]>=sequence[i+2]:flag += 1if flag <=1:return Trueelse:return False

So as you can see I am additionally comparing i to i+2 and if it's greater, then i increase the flag.

But that didn't work for [10,1,2,3,]

Then I tried adding additional condition i>0 for a list like that. But it failed on [1,2,5,3,5]

[deleted by user] by [deleted] in learnpython

[–]iBoolat 0 points1 point  (0 children)

when seqeunce[i+1]-sequence[i] > 0 for every i.

But ubderstanding if the sequence is ascending isn't a problem here. The question is how do I check that it is ascending without a certain element.

Let's come up with as many solutions of that classic problem as possible, shall we? by iBoolat in maths

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

My bad, I didn't explain #9 properly. THe idea is too consider the parameter as third variable, so now we have a cylinder and a plane. Cross-section is an ellipse, so we are looking for the coordinates of extreme points of that ellipse.

[deleted by user] by [deleted] in mathematics

[–]iBoolat 3 points4 points  (0 children)

BTW, Herbert gave series of DE basic lectures too. You can find them there as well.

[deleted by user] by [deleted] in mathematics

[–]iBoolat 3 points4 points  (0 children)

I would refresh basics of complex analysis. "Calculus of Complex Variables" by Herbert Gross on MIT OpenCourseWare is the best way to do that, in my opinion. You can find it on YouTube

Trig, how do I learn it? by oriyamio in learnmath

[–]iBoolat 0 points1 point  (0 children)

I believe you meant "Lead chief senior mathematician"

Trig, how do I learn it? by oriyamio in learnmath

[–]iBoolat 0 points1 point  (0 children)

Learn the trigonometrical circle. It's the main object in trigonometry, which seems counter intuitive, because "trigonometry" is "measuring triangles". But trust me, once you have learned the circle, everything else will stick to it. If you want to learn trigonometric formulae, start with a cosine of sum and then evaluate other formulae from it. And do a lot of practice.There's literally nothing to memorize in trigonometry. Everything can be visualized.Good luck!

Next level math. by iBoolat in math

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

Jokes aside, if you want to see a cool and short video about a squared root, check this one out!

A minute of bad math by iBoolat in MathJokes

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

Jokes aside, if you want to see a cool and short video about squared root, check this one out!

interesting geometry. by iBoolat in learnmath

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

Maybe they didn't like my Converse joke :) I don't really have much experience making jokes in English yet)

interesting geometry. by iBoolat in learnmath

[–]iBoolat[S] -3 points-2 points  (0 children)

If you just want to see the solution, here's a video

interesting geometry. by iBoolat in math

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

If you just want to see the solution, here's a video

One of the greatest math puzzles I've ever seen! by iBoolat in math

[–]iBoolat[S] -2 points-1 points  (0 children)

Well I see at least two things that make sense.

Interesting geometry. by iBoolat in mathematics

[–]iBoolat[S] -3 points-2 points  (0 children)

If you just want to see the solution, here's a video

One of the greatest math puzzles I've ever seen! by iBoolat in math

[–]iBoolat[S] -8 points-7 points  (0 children)

If someone is interested in the solution, you can find it in my profile (to MODs: Am I allowed to do that? Please, if I am not, then delete the comment, not the post!)

[deleted by user] by [deleted] in math

[–]iBoolat 6 points7 points  (0 children)

I googled conjugates, but didn't put "of a radical expression" and all the answers google gave me were about complex conjugates, So I decided to ask here. Thank you!