LegendaryGrandmaster's blog

By LegendaryGrandmaster, 6 years ago,

I have written a blog post on how to solve Facebook Hacker Cup Round 1 problem Autocomplete using a trie. This is a beginner level article and is meant for those who want to know what a trie is and how to use it in programming problems.

Enjoy!

PS: If you are not a beginner, please navigate away from this page immediately and DON'T CLICK ON DOWNVOTE! :P

• -13

By LegendaryGrandmaster, 6 years ago,

Since the official editorial is not yet out I have taken the liberty to write an editorial for the div. 2 hard problem in SRM 641.

Problem discussion: ShufflingCardsDiv2

• 0

By LegendaryGrandmaster, 6 years ago,

I need some help with a problem.

You are given a set S and a list L of subsets of S. L need not contain all subsets of S. Is it possible to pick some subsets from L such that they are pairwise disjoint and their union is S?

Note: It is not important to find those subsets. What is important is to be able to determine whether it is possible or not.

• -11

By LegendaryGrandmaster, 7 years ago,

Amrita School of Engineering, Bengaluru is organizing it's first ever programming contest as a part of it's national level technical festival Ekatva 2014. The contest will be hosted on Codechef. Only teams participating onsite are eligible for prizes although everyone is invited to participate.

I am the problem setter for the contest. Special thanks to PraveenDhinwa for helping.

Good luck!

• +8

By LegendaryGrandmaster, 7 years ago,

I have discussed a solution to problem 1225-Flags from Timus OJ on my blog. This is a beginner-level dp problem and I have tried to explain the solution as intuitively as possible.

http://theanirudhrb.blogspot.com/2014/10/problem-discussion-timus-oj-1225-flags.html

I am always open to feedback!

Have a nice day!

• -6

By LegendaryGrandmaster, 7 years ago,

I just published a tutorial on Disjoint-set data structures using UVa 10583 Ubiquitous Religions as a sample problem. Do read and give feedback.

http://theanirudhrb.blogspot.in/2014/09/introduction-to-disjoint-set-data.html

Have a nice day!

• 0

By LegendaryGrandmaster, 7 years ago,

I have written a blog post about the problem describing how to solve it.

• +11

By LegendaryGrandmaster, 7 years ago,

I need help in solving 441E - Valera and Number. The editorial was very brief. I am a beginner and am not very familiar with such problems.

• +2

By LegendaryGrandmaster, 7 years ago,

A few days ago, all of a sudden, I wanted to make my own Java code library for programming contests. But it is really difficult and time consuming to make code library from scratch. Also, I have noticed that Java implementations of algorithms are more difficult to find than C++ ones and that is all the more reason to create one's own Java code library. After a lot of searching, I found a really good code library on Google Code to base my own code library on. I thought of sharing this library with everyone here.

yaal — Yet Another Algorithm Library

I believe the code library belongs to the user Egor.

I am gonna take ideas from that and implement my own because this one doesn't suit my tastes. I think it can be made much simpler.

Have a nice day!

• -12

By LegendaryGrandmaster, 7 years ago,

Its been a really bad day today. My performance in round #218 was disastrous. My brain was almost shut down for the first hour. Then somehow it started working (but not as efficiently as I wanted). I made my first submission at the 58 minute mark to the A problem. (Yeah, you can call me a n00b. I earned it.) Then inspiration struck for the B problem and I quickly coded it. But I overlooked a critical condition which led to my solution being hacked. Needless to say I didn't try any other problems. I was more keen on hacking others' problems for the last 30 mins.

After my solution B was hacked, I quickly realized what went wrong. After the end of the contest, I resubmitted the solution and it got Accepted. All I had to do was to put a simple if block. :(