MrAladeen's blog

By MrAladeen, 4 years ago, In English

In my current company, we do something like... users play a quiz, top users win something. To show live leaderboard, we tell user to wait 1 minute, and each minute we run a crob to calculate the leaderboard by sorting the data, calculate rank of each user and save it somewhere, and everyone will see live leaderboard from that data, since sorting and calculating rank for each request will be too heavy.

Now I'm wondering, if I had to made that feature, I don't want to tell user to wait 1 minute to see his/her rank, but I'm unable to think an efficient approach. Then I remembered codeforces do it very well.

If I have to do it in C++, I will simply use ordered_set. But how will I do it if my data is stored in a database like MongoDB?

To be specific, I have only three requirements: 1) Each user can see their live rank 2) Rank of users on some page. Let's assume that page size is 20. 3) Insert in database

Full text and comments »

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

By MrAladeen, history, 4 years ago, In English

As you all will be well aware of COVID-19 situation and many companies are revoking offers, unfortunately my offer also got revoked but they gave me an alternate choice and I need help of experienced people in taking the decision.

So I'm currently doing internship in some xyz company (completed 4 months, 2 months remaining) and I also had a full time offer from the same company. It was paying me 15-20 LPA in India (for comparison, Amazon pays around 30 LPA and google around 40-50 LPA) so in terms of salary it was not bad but anyways I had a plan to switch company after my intern (I have good projects and good grasp on DSA). So I got a call saying that my offer is revoked due to financial situations of company, I don't have to work from now on but I will get a Internship certificate of 6 months so that it will also be helpful for me to get another job in future.

After some days I got a call from another team that they want me in their team but I will not have a gurantee of full-time offer. It will depend on performance of next 2 months and I will have to work more (10-12 hrs per day). So without giving a second thought, I joined because the work this team is doing is quite interesting and I thought I can learn new things from here and parallelly I can prepare for the interviews of other companies. But unfortunately I am not able to prepare anything after my office work. Even if we keep that aside, I no longer enjoy working here. I asked some peoples for advice and most of them are saying that no one knows when will hiring starts again and what will be the impact. So it's better to stay and try to get a full-time offer.

So there are two cases here to consider:

  1. I stay: I can give my 10-12 hrs per day for next 2 months and learn new skills but there is no gurantee that it will get converted after that. Despite of my performance if company don't have funds, it won't get converted to full-time.

  2. I leave: I can leave, brush my old skills and projects, focus on cp. So I can be assure that whenever hiring starts there will be 100% chances of getting a better offer.

In both of the cases, I will leave whenever hiring starts.

So according to my friends and mentors and seniors, if hiring won't get started for suppose next 6 months, and if I won't have an better offer in this time, I will not have any work to do and may get filled with negativity.

But according to me, there is no point of hard work here. I think hiring of freshers for SDE-1 will again start around after 2 months, and I should focus on cp and try for google, directI or facebook... I got referrals in some tier-1 companies but they all said the process is going very slow and can't say when will my interviews get schedule. What do you think, when will hiring boost up again?

It's a tough decision for me to take and I'm very confused and in serious tension that I don't have a job at the end of the year when I'm in top 500 in India on cf and also have good projects.

So what do you guys suggest? what will be the best thing to do here?

Full text and comments »

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