Skip to content
Paras Gupta

Jan 25 - Daily Programming Diary

Diary, Programming1 min read

14:00

Not feeling like doing anything today so I'll just be doing the Leetcode challenge for now.

The question seems very simple, and actually helps me maintain the lazy schedule I've been having today.

check-if-ones-are-k-places-away.cpp
1bool kLengthApart(vector<int> &nums, int k) {
2 int index = -1000000;
3 for (int i = 0; i < nums.size(); i++) {
4 if (nums[i] == 1) {
5 if (i - index <= k) return false;
6 index = i;
7 }
8 }
9
10 return true;
11}

Time complexity O(n), space O(1). Pretty simple, oh I love one of these days.

Gonna sleep again!

21:00

Last day at Raahee. It feels as if I started recently. No, it's not a phrase. Anyway, I hope for GSoC this year. Going to work real hard. I asked people for converting to functional components and the PR seems to have caught my eye. There seems to be a bug and I'm pretty sure it wasn't tested before pushing.

I fixed it! Turns out, the bug wasn't so small as it seemed at the first glance. But done and dusted! :)

HackOn Meeting at 10:00, I feel kinda useless in these meetings. I mean these people, they know what they're doing. And me? I'm a nobody. I could never belong. Let's see what's in store today.

I'll be back

22:40

OKAY. So I attended the meeting and my face is red (literally). Nervousness! These people are awesome and I hope I can learn a few things from them.

I'm tired!

EOD Checklist

  • Leetcode January Challenge
  • Raahee
  • This blog
© 2022 by Paras Gupta. All rights reserved.
Theme by LekoArts