Dontugiveup's blog

By Dontugiveup, history, 3 years ago, In English

Lately I've started to practice 2000 rating questions. Ofc this is not my real account. Whenever I'm picking up a problem lately, I'm unable to do that and feel quite directionless. I now have started to try for like an hour or something. But often I feel clueless, so I see the editorial, but often I don't even editorials too. What should I do here? Should I think more and more even if I'm clueless? Should I not read the editorial at all for atleast a day? How do you do a problem where you feel very lost and clueless? Do you see the editorial or keep on giving your mind to it for long? Some more description on how I practice: I take randomly and my max is around 1700.

Please be polite. I know this question might have been frequently asked, but they weren't as specific for me. thanks in advance :)

Full text and comments »

  • Vote: I like it
  • -21
  • Vote: I do not like it

By Dontugiveup, history, 3 years ago, In English

I understand that memoization creates stacks and it slows down the speed, but how? and when I shouldn't use memoization? How should I asses that memoization will fail or pass for sure. In a problem, I used memoization, it got me a tle, but then i did the same code, just except i didnt pass the vector reference, instead of this I declared the vector globally and it passed, I dont know why it happened. Since I'm kind of noob in dp now, I've been thinking to execute in both ways: memo and tabular. I reckon that memoization does the same or less number or operations than tabular.

It would be really helpful if you explain me some rte or tle stuff in memoization and why it slows down when stacks increase?

thanks in advance :)

Update: would feel better if i got some helping answers along with downvotes if it makes no sense to you guys.

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By Dontugiveup, history, 3 years ago, In English

I am wondering for a site or a list or ladder...such that it has topic wise questions and there shouldnt be too many questions. There should be limited number of questions on a specified topic, such that doing them will make sure that one has got a good grip on that topic. Like questions should go from easy to hard.

Thanks in advance :)

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By Dontugiveup, 3 years ago, In English

I reckon that the graphs that can be colored using only two colors are bi-partite. Now, if we talk about a graph:

  1. suppose it is not a bi-partite graph...and we wanna see it through dfs..

if it's not bi-partite then the following image condition will be available in the graph atleast once:

https://ibb.co/zSSRBh9

so as we reach any vertex amongst those and mark it with a color, and reach any other vertex and then other vertex then there surely will be a color contradiction (two adjacent vertices with the same color)

hence this will give the result as false.

  1. since if the graph is not bipartite then it would cause a color contradiction and vice versa...hence if there's no color contradiction it is going to be a bipartite graph.

Am I thinking it the right way? or Am I missing out on something?

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By Dontugiveup, history, 3 years ago, In English

I kind of feel that it does, but I've not been able to convince myself that it does. How can I make myself sure about dfs traversing every node?

help me having the view to look at it.

Surely could be a naive question, but any help is appreciated :)

Full text and comments »

  • Vote: I like it
  • +11
  • Vote: I do not like it