Surfer1999's blog

By Surfer1999, 22 months ago, In English

Given a string s, return the length of longest substring such that every character in the substring has equal number of occurance.

I tried to find solution better that O(n*n) but didn't succeed. Can it be solved in better than O(n*n) ? source of the problem: https://leetcode.com/discuss/interview-question/2116387/google-oa/1424270

Full text and comments »

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

By Surfer1999, history, 22 months ago, In English

Problem: https://leetcode.com/problems/race-car/

From intuition, I think that we should ignore all points after 2*target and less than 0. Could someone provide proof or counter example for it ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Surfer1999, history, 22 months ago, In English

If we take lot of problem of say 1700 level, we would observe that many of them have similar pattern or approach of solving.

Is there some list of problems which will give me familiarity with pattern and approaches for most problems up to 1800 level ?

Full text and comments »

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

By Surfer1999, 3 years ago, In English

I am currently in final year and have job offers. I still like to do competitive programming but it takes away lot of time. I try to give sometime to development but still can't take focus away from competitive programming. Currently I am targeting for master on codeforces. Do you think it's worth spending time provided I have enough skill now to crack any job DSA interview (ofcourse sometime it can be bad luck)? I enjoy doing it. Cracking jobs was not main purpose for starting it.

I sometime think that if I spend that much time doing things like full stack development, I can earn lot of money through freelancing. But still I like CP over any dev work.

From my internship experience, it hardly helped me. Infact it made me lazy since I always switched to do CP during work hours :/.

Full text and comments »

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