2025
May 14 to August 1
Started my internship at Coinbase. Cool tech, great team and learning a lot.
May 5 to May 14
- ENDSEMS GRIND.
- LC: 121
- DA was tough, Bio went good, Entre went fine I think.
May 4
- data analysis.
- Burning Mao: Fernanda Eberstadt Good Article.
May 3
- LC: 1007 man I really enjoy coding.
exam time just makes me realize how much I just like coding. - 'I found your dad': The mystery of a missing climber what a beautiful article.
April 30 to May 2
Worked on Mini Project. Getting inference to run on a single image was much more annoying than expected.
ended up in pcell. wish me luck.
April 29
- Consecutive 1's not allowed simple problem. pcell things took up a lot of time. hoping there's something I get from this.
April 28
- LC: 2302
got a data analytics quiz day after tmrw. wish me luck.
April 27
- had entrepreneurship presentation today. went well.
- LC: 3392
April 26
- gemini 2.5 flash with the right prompt is honestly a good life coach I think. Take it with a grain of salt but got some good advice. Just need to apply it lol.
- had my bio quiz today. went okok. need to get to the root and fix my habit of procrastinating.
- LC: 2845
- Longest Common Substring last couple of weeks of sem so going to have to focus on courses.
April 25
April 24
- LC: 2799 Easy tbh.
April 23
- LC: 1399 what's up with LC daily's. Goes from super hard to super easy
- CF: 1019C Upsolved C from last div2 Man almost had this. Just needed to fix one line. Atleast now I know I'm improving.
- scikit-learn makes SVM, DT everything so easy. Feels like cheating ngl
April 22
- read Theory of Change by Aaron Swartz (R.I.P) Starting from your goal and moving backwards and figuring out what needs to be done is a simple concept but not the first thing that comes to mind(Usually we see what we can do and execute those but obv that's less effective). Good Blog.
- read debugging your mind by danb. Honestly I don't quite grok the blog yet. Just keeping it here to revisit in future.
April 21
- appeared in CF 1019:Div2. was able to solve A and B. Was pretty close to solving C as well but messed up implementation.
- LC: 2145
- LC: 354. Really good problem.
April 20
- appeared for weekly contest, am rusty, did super bad. But the third question was pretty sweet. upsolved it after the contest.
- LC: 781
April 19
- Added scrobble data to my homepage. wanted it forever and it's finally done!
April 18
visited MNNIT campus to watch bball match.
- Solved GFG: Minimize the Heights I
April 17
- LC: 300 $O(n^2)$ solution
- LC: 300 $O(n\log(n))$ solution
- watched Concurrency is not Parallelism by Rob Pike slides
- this was my first introduction to goroutines and channels and I must say, I really like how ergonomic everything feels. Easy to write and easy to understand. Also channels being first class citizen is a game changer. So make a request struct, with one field as function to run and another as channel to write the result
type Request struct { fn func() int // The operation to perform. c chan int // The channel to return the result. }
the load balancer bit at the end kinda went over my head but I think there's alpha in investing more time to understand it.nvm I think I understand it now. Final takeaway: Concurrency is not the same as Parallelism but Concurrency makes Parallelism easier.
April 16
- LC: 62 c++ go push dp better.
- LC: 63 go really liking push dp.
- LC: 174 been a while since I last did a hard myself!
April 14
- LC: 1402
- GFG: Rod Cutting
- made notes about the structure of my go project.
- deployed a backup blog!
April 10 to 13
- worked on SNA project: Hoax Call Detection (and watched movies)
April 9
April 8
April 7
April 6
- deployed our solutions site on gcloud compute, used apache and pm2 for keeping it alive. Configuring https with certbot was easier than expected. Automates the whole thing.
- LC: 368
April 5
traveled back to hostel. probably one of the last few times. won't be missing the long layovers though heh.
April 4
April 3
April 2
April 1
March 31
Eid Mubarak! π
March 30
March 29
- upsolved cf div3 D and E. honestly it wasn't too bad, just should've gone for the formula version instead of whatever I did with loops
- been keeping track of which sites I spend the most time on and x.com is first rip. gotta reduce that somehow pensive
March 28
traveled home
March 27
finished up packing. cleaned up room. started steve kimmey's course on writing your own compiler on frontend masters.
March 26
was busy with packing so mainly just worked on deploying the site. got backend finally deployed on cloud run.
March 25
- solved 10 problems on alcumus
- gave cf contest, got rekt.
March 24
- solved 10 problems on combinatorics and probability from AOPS's Alcumus
- starting one ThemeCP everyday. It's just a way to get problems around your rating since you need to practice both problems that are doable(to train speed) and that are just outside your comfort zone(to train logic building). Since current rating is around 1300, my suggested level included 900 1000 1200 1400
- LC: 3169
- vibe coded functionality cause deadline is near.. d1b068e 42c77a5
March 23
sleeping in is dangerous...
March 22
didn't get much done today. taking rest.
- LC: 2685 doable
March 21
Mainly just worked on userAuth and adding methods for performing CRUD operations. Decent amount of work is left on the frontend, not sure if we'll be able to touch the finish line.
- Colin Galen's Mashup E was 1800 :sob: I had the right initial thought but couldn't figure out a way from there. It's quite an elegant question tho, boiled down it was just pick or not pick.
March 20
- B. Yet Another Broken Keyboard again easy tbh
- Solved C and D too. 1200 rated so not bad.
- Worked on implementing Auth in Django. honestly super annoying.
- LC: 3108 DSU comes to the save.
March 19
- LC: 3191 Nice question. Was thinking if there's a mathematical way but ended up doing it greedily. C++ Go
- A. Filling Shapes Starting Colin Galen's DP mashup. First question was pretty easy tbh.
March 18
- Finished the Complete Go course from Melkey. Great Course, and I'll likely revisit it once again to understand it more deeply. Until then just gonna solve project euler problems with go.
- LC: 2401. Easy
March 17
- Learnt about implementing OAuth in Django (so weird tbh). Thanks Amaresh for the guidance. Code here
- chilled a bit cause classes starting from tomorrow
- LC: 2206 Solving easies in go is quite fun actually. Have to look up why do we need to use make for initializing a map in golang.
March 16
- Learnt bit more Go and Postgres and Docker today. Melkey's Course honestly making me a better backend developer too. Thank you FrontendMasters for the free 6 months.
- Learnt about Testing too and lil bit about Authentication, need to delve properly into it. Also SQL things. Honestly course covered a lot of things and I need to revisit the codebase at the very least to learn properly.
March 15
- LC: 2560
- Worked on fixing the bugs in go project, missed a couple of commas here and there
- change tmux window name to suit my liking.
March 14
- LC: 2226 Binary Search. Standard Application
- Got a quick refresher on the internet and how it works from Jem Young's Course on Fullstack for Frontend Developers. Thank you frontend masters for providing with free 6 months :love:
- Setup a VPS on gcloud with ssh keys and using it for deploying.
March 13
- LC: 3356 Really nice question. Combines difference arrays and binary search
- learnt more golang today. structs and member functions are so cool. Also learnt how to deploy postgres on a docker using docker compose and just following along with Melkey's Go project. I don't quite get some of the design decisions that he has made but I think I can implement most of it.
March 12
- LC: 2529 Easy daily so trying out golang.
- Got done with Project Presentation. Went fine tbh.
- Learning about slices, arrays and loops of golang.
March 11
- LC: 1358 Easier version of yesterday's daily tbh.
- started learning go from Melkey's Complete Go workshop on Frontend Masters. it's super good. I really like go's syntax so far too. A friend told it's a mixture of python+c++ and I can't agree more.
March 10
- done with midsem!
- done with brian's react course!
- solved LC: 3306
March 9
March 8
- LC: 2379
- french was bad ugh. should've studied verb conjugations.
- vitest is nice. fetchMocker and fetchMockResponseOnce is also good. Really interested to see how they implemented it tbh, fascinating how all the testing stuff works.
March 7
- LC: 2523. Got to use sieve after a long time.
- Mock testing is weird...certainly useful to learn tho. brian's blog on testing user interaction. Use vi(spy client to peek on the internal values), create a queryClient instead of an App and then get the fields and button using screen methods and then submit using button.click(). Also await screen.findByRole() allows to wait on a certain element until arrives. Using fetchMocker is kinda akin to emulating the fetch request thus allowing us to peek into parameters it was called with. Good stuff.
March 6
March 5
- Uncontrolled forms are cool! Brian's Post on it. So you can use a useMutation from tanstack-query where you define the onClick function which is just a fetch that is doing POST at /api/contact. Also FormData gives a set of key/value pairs which we can just get the values by formData.get("key").
- LC: 2579 Daily
- Daily React: Learning about vitest. Brian's Blog
March 4
- Virtualization is honestly so cool. Was learning about memory virtualization and how do you manage pages with guest OS? If you forcefully take it away then there's a chance that you're taking away the important pages. Here's where we introduce the concept of ballooning, i.e create a dummy device and ask for memory. This way guestOS has control over what memory to give. What a smart way to implement cooperative memory allocation! Stuff like this reminds me why I like learning about computers so much.
- LC: 1780 Daily.
- Bio exam was ok ok.
March 3
- unduck is so good. 100% recommended.
- LC: 2161 Daily
- React Error Handling is nice. Error Boundaries
March 2
- LC: 2570 Daily.
- Studying Cloud Computing today. Loving these lectures from Prof Mythili: CS695
- React Modals are weird. Definitely need to use this more to get used to it.
March 1
- Bio Quiz today. went fine
- LC: 2460 Daily
- Tanstack Query is nice, makes caching and retrieving values from API simpler and I can see why Brian recommends it over useEffect. Comes with batteries and good developer experience. Really need to switch over to this for my project.
February 28
February 27
- Learnt about context and how it's used for maintaining states where it's required by multiple components. Cool stuff but yeah can see how it can be a footgun. Brian told not to use it unless it's an object that's required by the entire app like user account or theme. If it's required only at a couple of places then just better to prop drill. Make the state in the parent components and pass it down. That way only the components that you know require it, get it.
- Learnt a bit about TanStack Router as well, pretty cool way to handle redirection but well the setting up part seems like a pain. So it's an example of client side routing where only a part of the site gets updated compared to server side routing where the entire HTML gets changed when a user navigates requiring a full page reload. An example of this is that header and footer usually remains the same and only the body gets updated.
February 26
- Learning a bit of react, french and vm live migrations Gonna reduce programming a bit until midsems get over.
February 25
- Started learning bio for my midsems wish me luck
- Solved A-E in CFDiv3. Why are my performances always better after a break lol. Back to 1300s
February 24
- Read some solutions for ABC 394E. Good problem.
February 23
- Solved first two on LC Weekly Contest.
- Started learning React from Complete Intro to React v9. Went from writing plain React to using bundler like Vite and linters like ESLint. Good stuff.
February 22
- Completed Getting Started with Javascript. Nice course, I am a bit more clear on why certain things are the way they are in JS. I should really read Kyle's book You don't know JS yet when I get time.
- LC: 1028. Nice daily. Thinking about it from
February 21
February 20
- LC: 1980
- Radar Had the idea for this but took a while to get the implementation right.
- Festival 2 Multisource BFS.
- Go Doing stuff in reverse helps.
February 19
February 18
- Edu Div2. Went bad could only solve 1. First contest back from sickness tho so expected.
- Solving BFS/DFS graph questions from MarisaOJ
- Bamboo Forest of the Lost Really good problem. Kinda guessed my solution tho, but yeah it made sense. Should try proving it.
- Festival 1
- Tom and Jerry
February 13 to 17
Fell sick. Just solved LC daily questions. Just a bunch of backtracking problems.
February 12
- nice daily: LC: 2342
February 11
- Quiz went fine.
- solved daily.
February 10
caught fever so just going to study for SNA quiz and chill.
February 9
- LC Daily: Count Bad Pairs Try to count good pairs and then subtract that from total pairs.
- CF div4 1003 Solved till D. E was honestly doable, maybe if I slept more.
February 8
- LC Daily: Design A Number Container
- Atcoder ABC 392 Was able to solve A-E for the first time. Also solved a graph question in contest for the first time!
February 7
- LC Daily: LC3160
- CF1254B 1200
- Working on backend for a chatbot.
February 6
February 5
February 4
- Solved ThemeCP. Was able to do all 4. CF1200 CF1200
- LC1800 Daily.
- CF Div2 1881C 1200. Implementation. Trivial if you know how to iterate through where the new coordinates will be after each 90 degree rotation.
- CF Div2 1537C 1200. Trivial with multiset.
February 3
Had my interview today. Went well imo.
Should've tried to be more clearer while speaking. Think, take your time, don't rush.
Other than that I'm super satisfied with my performance. Was able to code part 1 fairly quickly and took my time on part 2, was able to explain my idea.
All the time I spent watching/consuming tech things kinda paid off since I was able to think for a bit and give the right answer I feel like.
February 2
February 1
- Worked on OOPS in C++
- Solved some problems.
January 31
Learning more LLD.
January 30
- CF 2035C 1400
- CF 1352B 1200 Learnt about LLD of Tic-Tac-Toe and Stock Exchange system and how to implement it. Clean Code.
January 29
- working on building a shell: CodeCrafter's Shell
January 28
- 1547. Minimum Cost to Cut a Stick. Smort way to get the sum of the partition.
January 27
- Doing ThemeCP, did 1 800, 2 1000 and 1 1100. 1100
- Solved all 4 problems for the first time in Codesignal. Glad to see work pay off.
January 26
- Codeforces div1+2, was able to solve AB and misread C ;-;
January 25
- CF 1515C. Had to see editorial
- Atcoder ABC390 ABC. D was smort brute and E was DP.
January 24
January 23
- CF 1679C Clever.
January 22
GFG MCM got it first try omg. Man I'm so proud of myself. All that struggle with Atcoder DP sheet paying off lol. With indexing, try your level best to write on your own. That's the only way to get good.
CF C. Rooks Defenders. Keep track of open rows/cols with sets and run lower bound on it. Nice problem.
LC: 1267. Easy
LC: 1765. Easy BFS.
Atcoder DP contest _ M - Candies Finally! Struggled way too much with this. _ N - Slimes Bruh this is kinda painful. but we solve and continue the grind! Insane day. Gave three contests.
- CF went bad. gambled on solving C first but failed and B took too much time.
- Codechef went great was able to solve 3 problems and was able to get sub 300 rank after a loooong time. Kinda guessed, kinda did properly, proof by AC :)
- GraphX by Algo University Rank 6 lol
January 21
- Had 6 hours of classes today. So not much done.
- LC: 2017 done.
January 20
- Atcoder DP
- L - Deque. Quite annoying to tabulate. nvm there was a much better way to formulate it.
- Gave CF div1+2, solved ABD. All were kinda easy only hmm. Nvm got hacked on B. Specialist my beloved ;-;
January 19
- Spent around an hr and half trying to understand. D - Squares in Circle. Quite elegant solution. Count the number in squares in one quadrant and then multiply by 4.
- Spent similar amount of time on E - Square Price, really good binary search problem. first this to figure out was that we need to minimize the maximum price. second thing how do we calculate the minimum number of items, price of $k$ items of price pk = $k^2$
what is the price of kth item?
$= k^2 x - (k-1)^2 x = x(k^2 - k^2 +2k-1) = x(2k-1)$
so how many items can we get with atmost price = m?
$m = x(2k-1)$ -> $m/x = 2k-1$ -> $k = ((m/x)+1)/2$ after this just use this to get count and cost for each m and check if cost is greater than maxCost possible. binary search on it.
last step is to cnt+(maxCost-cost)/(l+1), to add leftover items. Since we will have maxCost-cost money leftover and then divide that by price of remaining items to get number of leftover items. - Gave codeforces div 3 998 today, solved ABCD, should've thought E in terms of connected components.
January 18
- Gave Atcoder and LC contest
- Atcoder: ABC, D is math/geometry (need to get good at this) and E is binary search. Happy I was able to figure out that E was binary search but yeah should've been able to solve it.
- Leetcode: Solved first 2. 3rd was tree+sliding window(?) and 4th was combinatorics.
- Continuing Atcoder DP Contest
- Solved LC: 1368
- Upsolved CF Contest 997 B and C. Both codes are short but I honestly couldn't come up with it during the contest, even if wording was better ig.
January 17
- LC 2683 Solving daily. Greedy.
- Solving Atcoder DP Contest
- A - Frog 1 done.
- B - Frog 2 done.
- C - Vacation done.
- D - Knapsack 1
- E - Knapsack 2 Cute problem.
- F - LCS Nice CSES type twist on LCS, printing the longest subsequence.
- G - Longest Path Given DAG, find longest path. Not bad.
- H - Grid 1 Find all paths. Not bad.
January 16
- Read Implement Hello World
- Upsolved Start 169B Constant Subsequence. Cool binary search problem tbh
January 15
- START169B Solved first 2 pretty quickly. 3rd was binary search which I completely missed pensive.
- LC: 2097 Eulerian Paths are cool.
- LC: 2429 Bitsets are cool.
January 14
- Took my time to understand the Eulerian Circuit Algorithm.
Solved CSES: Mail Delivery Code. USACO Guide is so good. - LC: 2567
January 13
- AC ABC388D Upsolving...
- LC: 1926
- Solved Graphs Camp January `25: Problem A to D were standard, easier version of CSES. E was nice. Using their library would've helped more I think.
- AC ABC388E Upsolved till E!
January 12
- Attempted CF contest: could only solve 2. Couldn't think of a way to solve C. Upsolved after contest.
- LC: 752
- LC: 3418
- LC: 3417
January 11
- Attended AlgoUniversity's Graph Day Camp 1. Discussed these problems:
- LC: 1654. Kinda guessed the solution to this one.
- LC: 1254. Nice problem. I think I was able to come up with an elegant solution too. Start with islands on the edges and mark those as waters since they are invalid. Now run DFS on those as any island connected to those are invalid. After that just run DFS on remaining island to count leftover.
January 10
- LC: 1162. Easy BFS.
- LC: 1129. Good problem.
- LC: 417. Had to see editorial for idea. Could implement on my own. The way to do everything in reverse is actually kinda genius.
January 9
- LC: 1376. Easy DFS
- LC: 433. Easy BFS
- LC: 882. Again had to go through solution. Couldn't think of dijkstra solution.
- LC: 399. Cool problem. Had to check editorial though.
January 8
January 7
January 6
January 4, 5
Travelled to uni. Back for 6th sem.
January 3
Same solution worked for both lol.
January 2
January 1
- Got my PR merged! link
- CSES: Road Construction
- CSES: Road Reparation
- CSES: Planet Queries I
2024
December 27 to Decemeber 31
Took a break. Happy new year!
December 26
Graph Grind Continues:
December 25
Merry Chirstmas
- CSES: Flight Discount
- CSES: Cycle Finding
- CSES: Flight Routes
- CSES: Round Trip II
- CSES: Course Schedule
- LC: 515 Daily.
December 24
December 23
- Graph Problems
- Daily LC: 2471
December 22
December 21
- LC: 2872. Today's daily. kinda got the idea but needed to watch Larry's video since I wasn't able to implement it. Good problem.
- Solved ABC in today's Atcoder ABC (lol). I think I have an idea for E but no clue on how to approach D.
- SQL LC:585 LC: 1667 LC: 1527 LC: 196 LC: 176
December 20
- CF 994 Div 2 Solved ABC. Good perf. Rank 3196
- LC: 827 Done with Striver DSU questions.
- Started working on my project finally: 7649a3d
- LC: 2415 need to solve more recursive problems.
December 19
- SQL: LC: 602
- LC: 778 Trivial Dijkstra.
I have no idea how to solve it with DSU.DSU solution is cool! So first we need to map 2D -> 1D, for (x,y) -> n*x + y. After that iterate through times, mark each box as visited. And while iterating check it's neighbors. At the end, check if (0,0) and (n-1,n-1) are connected. - LC: 721. Honestly I don't think I would've thought of DSU if I didn't encounter this problem under that topic.
- LC: 769 Nice daily
- LC: 947. DSU practice continues
December 18
- LC: 990 Finally solved this problem. Actually easy but couldn't think of processing equals first and then moving to not equals.
- CF Edu questions are really good. Solved DSU Step 1 ABC.
- LC: 1319
- SQL LC: 3121
- (re)Learning DSU: Union Find. Speedran CF Edu Videos and learnt the implementation from USACO Guide
- CF Edu You need to login and enroll first though in the ITMO under EDU section.
- USACO Guide DSU. There's a lot of resources on here so just find something you like and stick to it.
December 17
- LC: 1976 This one took a lot of time for me to understand but I think I get it now. Key idea here is to just update while traversing with Dijkstra.
- LC: 1334 Old daily but I did remember that it was Floyd-Warshall.
- GFG: Minimum Multiplications to reach End
- LC: 2182
- SQL LC: 1341
- LC: 743 With Dijkstra this time. We do not need to perform Dijkstra from src to each destination, just continue until queue was empty and then check if all nodes were visited. If yes then return last distance (which is the max) else return -1.
December 16
- LC: 743 Single source shortest path. Bellman Ford is so elegant. Since all are positive we can just run Dijkstra for all points.
- LC: 1631 LC: 1091 Practicing Dijkstra.
- LC: 84 LC: 85 Just finishing up Striver
- LC: 2104. Extension of LC 907. O(n^2) is trivial and I don't think I would've been able to solve it in O(n)
- LC: 907. Finally understood why taking we can't take less than and greater than directly and how choosing changing one of them to >= or <= gives the right answer.
- Working on AOC day 15 part 2. It's getting annoying ;-;
- SQL: LC 626
December 15
- SQL: LC: 1978
- LC: 1792 Daily
- AOC Day 15 Part 1: Writing a correct simulation is so satisfying.
- Finally home
December 14
- SQL questions LC: 1164 LC: 1907
- LC: 2762 Daily. There's definitely a better way solving keeping track of min and max using a multiset.
- LC: 239 Deque is cool.
- AOC day 14 was something...needed help for part 2. But super cool! Doing stuff manually is always an option.
December 13
- LC: 2593 Daily.
- Today's AOC was easier (if you just used sympy).
- Reached
home. Day after tmrw.
December 12
- Learnt a bit about std::move() and move semantics. lvalues and rvalues.
- Longest Substring with K-Distinct Characters. Just sliding window
- Minimize Max Distance
I think with the GFG constraints it's better to solve with priority_queue. I want to say it's impossible with binary search but not sure.Nvm I just didn't think it through. - LC: 402 Spent annoyingly long time on this. Should've read solution earlier.
- LC: 610 SQL LC: 180 SQL
- LC: 1789 SQL. Discussion had this elegant solution. Mine was much more contrived.
- LC: 1731 SQL Back to SQL.
December 11
- LC: 84 Another one.
- LC: 42 Solving a classic.
- LC: 2779. Sliding Window. I'm curious what's the binary search solution. I think we can just binary search for range [num-k, num] and [num, num+k] mhm.
- Today's AOC was kinda painful. Part 1 brute force and Part 2 I kinda spent way too much time trying to find a pattern before getting hint that it's DP ;-;
- Solved a couple of CF problems. Getting mogged by 1100 cause I didn't think enough
December 10
- Travelled to Hyd today. Thus starts my short 5 days detour before going back home.
- Solved AOC day 10
- LC: 2981. Simple.
December 9
- lol our seniors used to say that it's easy to score in later sems. Like you can just study 1/10th the amount and get 90% of the marks. I didn't get them back then but I do believe it now. Studied barely 3 hrs before each exam and was able to get above average grades in everything so far lol. Let's see if I manage to cross 8 this sem. Survivorship Bias.
- LC: 3512 Cute Prefix Sum.
- Upsolved Div2 990 C. Got the idea during contest but failed to implement it. Looking at it from a bits perspective makes it so much easier tbh.
- Solving LI2 Contests. Loop was kinda trivial. Had to think a bit on the last 3.
December 8
- AOC was tough and Div 2 went ok ok. Still pupil.
- Got rekt by today's daily. LC: 2054. Need to do more interval problems.
- LC 1045: SQL: Needed to Count(Distinct product_keys)
- LC 619: SQL. Subqueries++
- LC 1729: SQL Just Count(*) and ORDER BY.
- LC 536: SQL Simple GROUP BY+HAVING question.
- Solved Next Smaller Element to the Left
- LC 1070: SQL. Using subqueries just makes life so much easier.
where (s.product_id, year) in
(
select product_id, min(year)
from Sales
group by (product_id)
)
December 7
- LC 550 SQL
- AOC Day 7: Better than yesterday. Was able to optimize it to run under 12 seconds suii.
- LC: 1760 Binary search daily.
- Met up with seniors before they leave for their 6 months internship. Should've gone to meet them more often lol.
- LC: 503 Should revise later.
December 6
- LC: 2554
- Had my Mini Project Presentation today and it was chill.
- CodeSignals are Strict.
- AOC Day 6 Part 1 done. Part 2 done. Took like ages to run though!
December 5
- Gud div 3 contest. Could've gotten E but pein.
- Codesignal OAs are brutal. Need to get faster. Or switch to python.
- LC SQL: 1251. Proud to solve this with no help! These ones are taking longer than before lol.
- Solved some more before sleeping. Being able to pass parameters in Count is so cool!
count(case when rating < 3 then 1 else null end)
LC 1211: SQL - LC: 2337. Daily. Got more WAs due to skill issue.
- LC 1193: SQL: Learnt about to_char(trans_date, 'YYYY-MM'). Cool stuff.
December 4
- LC SQL: 1934 Getting used to SQL Subqueries. Best way to learn is by doing.
- Advent of Code was tough to implement. But I'm happy that I was able to code it without any help! Indexing hell: day 4 main.py
- Easy LC daily.
- I think I'll leave Advent of SQL for later. Seems too advanced for my current level ;-;
- Solved Prefix to x and Postfix to x type questions using stack. It's so simple lol and it makes sense.
December 3
- LC: 2109. LC daily
- AOC Day 3. Regex-Fu. Code here: main.py
- Started Leetcode's SQL50, first 10 were straightforward so blew through them.
- Advent of SQL is really annoying lol.
December 2
- LC: 1455. Kinda annoying to do in C++, easy to do in python.
- AOC day 2, learning about python lol. so if
_list
is a list and I donewList = _list
then it doesn't create a new list, it's just a new variable that refers to same object that _list refers to. Ways to avoid?
newList = _list[:]
newList = _list.copy()
# or if you just want sorted then
newList = sorted(_list)
- Advent of SQL Day 2: This has been challenging since I didn't know about SQL functions like UNION and string_agg, but hey that's why we do this!
December 1
- Easy Daily: LC: 1346
- AOC Day 1. I think need to just skip the story and read and solve the question haha.
November 30
- Hidden Surface Elimination Algorithms like zbuffering is cool.
- LC: 225 Easy. Implementing stack with queues.
- LC: 232
November 29
- All exams so far are eh. Should make a plan on how to finish everything before I start studying. I think that's the biggest mistake I made so far. Need to start Computer Graphics Tomorrow. Gn.
- Solving LC: 240. Lol should've thought of greedy instead of just binary search.
November 28
- ML also bad. Let's see if I'm able to reach 8 this sem ugh.
- Dijkstra's implementation with priority queue is better due to cache locality and since operation on heap is less resource consuming than operations on a red black tree.
- LC: 2290, Dijkstra on Grid. Learnt something new.
November 27
- LC: 3243. Nice daily
- IVP went eh
- Learning ML
November 26
- LC: 773 Needed to see editorial but was able to implement it by myself after understanding how to simulate the moving thing.
- LC: 2924 Easy daily.
- Learnt more IVP today.
November 25
Image Compression is genuinely so cool. Learnt about Huffman Coding, Goloumb Coding, Arithmetic Coding and Gray Codes. Cool stuff.
LC: 187 Needed double hash to pass. There's definitely a better solution than this tbh. Edit: you can just compute a sliding window rolling hash?? Need to check this properly later.
LC: 735 Striver A2Z: Stack section. Daily too hard and I don't want to spend time before endsems ;-;
November 24
- Learning ML today.
- LC: 684 Solved with help of editorial. I had this idea of running DFS but just assumed it would TLE. Notes to myself: calculate time complexity for everything.
- Matklad's Learning Resources. Great blog!
- LC: 1975 Simple greedy. CF type problem maybe?
November 23
- LC: 1861. Easy but took a bit to implement. Kinda reminded me of ABC B.
- LC: 47. Sort and next_perm spam.
November 22
- Had DTI presentation in morning. Went meh.
- Surprisingly internals marks are good. At least in IML, GVC and CS. Hopefully IVP TA comes through.
- LC: 1072. Used manual hashing to reduce time/4.
November 21
- LC: 2257 Questions with grids kinda make me panic lol. Need to solve more questions.
- LC: 2516. Yesterday's daily. Actually not bad. Ok back to studying for ML viva.
- Messing around with Blip Model for our Mini Project and this shit sucks man. I really wish I had a more powerful laptop to run this thing locally cause using colab is not it.
November 20
- Was sick today so couldn't get much done.
- Went and got done with IVP presentation. Advantages of having a good group ^o^
November 19
- Upsolved CF 2009E. Needed the editorial, I was trying to find the prefix closest to sum/2 but instead what I should've gone for i where sum of suffix >= sum of prefix. then take min of choosing max prefix and max suffix. Ok so sum wouldn't fit in an long long as well so that's why I got wrong answer. Yep Python passes
- Solved CF 1983C. I remember giving this contest and failing badly. Got the idea quickly, took sometime to implement it.
- Had AI Quiz and Lab. Went meh. Also had CS lab viva which went fine.
- Solved [LC: 2461]. Got 3 WAs which is 3 too many but was able to implement it under 10 mins.
- Upsolved E: 1D Bucket Tool from recent ABC 380. Implementation. Spent around an hr. Learnt about sets of pair and ways to write shorter and bug free code. Problem Description is simple though so definitely recommend checking it out.
November 18
- LC: 862 LC Daily. Couldn't solve it on my own. Found out about cool two new tricks to keep track of minimal pf sum and it's length: store it in a min heap or use a monotonic stack(or queue/deque).
- LC: 1652 Took me longer than I thought. I think I could've solved it faster if I just wrote index on pen paper
- Big day! Had a lab on Image Video Processing and quiz about Computer Graphics. Both went good enough lol.
November 17
- To Read: https://sbaziotis.com/compilers/compiler-opt.html
- LC: 74. Learning how to use inbuilt binary_search has been a boon. 6 lines.
- LC: 81 Just solved it again cause spaced repetition!
- GFG: Painters Partition. Finally kinda getting how to minimize the max type questions using binary search.
November 16
- LC: 3254. Easier daily imo.
- ABC 380. Was able to solve ABCD. Good contest.
- Studying Computer Graphics for a quiz on monday. It's cool tho! Learnt about clipping.
- Got cooked by ZScaler OA. Need to get cracked at graphs and dp. First finish striver and then start practicing random questions and get good at this.
November 15
- LC: 2064
- LC: 875
- LC: 1574 Good problem. I didn't know you could two pointer like that.
- Worked a bit on GrubGuide.
- Focusing on acads so will disappear randomly. Adios!
November 14
- GFG: Row with max 1s Solved easy binsearch. I can feel the DSA high dying lol. Need to keep solving problems regardless...
- Struggled solve old Distribute Books problem, guess I didn't learn it properly. Gonna do it the right way this time.
November 13
- LC: 2265 Aight blocking lc for now.
- GFG: Find nth root Procrastination continues
- GFG: Daily, Find intersection in linked list
- Had CS viva today, went meh. Had DTI and IVP both went meh.
- Didn't do much in the evening as well. Tried one GFG problem failed to solve it as well ;-; GFG: Allocate Minimum Number of Pages
November 12
- Solved CF D. Palindromes Coloring. 1400s seem more doable now. I can feel the improvement.
- Solved LC: 2070. Daily.
- Solved GFG: Meeting Rooms Daily.
- Learning IVP for quiz tomorrow, wish me luck ;-;
- LC: 1498 Procrastinating on studying by doing LC Mediums :skull: Cool problem tho. Took me around 17 mins to solve+implement
November 11
Solved LC: 99 Needed to check editorial. Couldn't come up with O(1) space solution. Nvm there isn't one. Recursion = O(1) which is not true.
To read later: http://blog.ezyang.com/2019/05/pytorch-internals/
Few more updates, cart number is now updated whenever user adds a new dish and cart redirects properly for both logged-in and logged-out users.
Worked on my project today. Implemented CRUD for Users and learnt about localStorage. Right now I'm randomly assigning an user id for person who has not logged in and then just unsetting it when they do. Need to add logic to associate old cart details with logged in user, if there's no dishes in cart with new user. Else don't update anything.
LC: 2601: Just greedily try to remove and satisfy the condition. I think this is the type of question you get really good at if you just do CP. Another medium in under 20 mins.
November 10
- blind 75
- LC: 3097 First sliding window problem I was able to solve on my own! I feel like I'm actively improving right. Should ride this high while it lasts.
- Binary Search Trees: keeping track of bounds is a cool idea!
- LC: 3349, trying to solve easies in an optimized manner
November 9
- LC: 3133 Good implementation based bitwise question. Since we need bits set in x to be always set, we can just fill bits of n-1 in the empty places of x.
- CF 1719C 1400 Could've avoided many WAs if I just wrote proper test cases che.
- Gave Biweekly 143. Went well! Got
rank 1572, hopefully don't get hackedNevermind getting hacked lol: Missing Test Case - 3640
November 8
- Solved CF: 2008F 1400. Integer overflow hell :c Need to find a better way to write code.
- Solved CF: 1927E 1400. Simple problem
- Solved another bitwise question. LC: 1829
- Learning webd c: React seems so much ergonomic to type
November 7
- ML Lab: Remember to study how each model learns and how does it compute the output.
- LC: 2275 Learning Bit Manip might be one of the best decisions I have made I think cause it makes questions like this trivial.
- LC: 82 best way to solve linked list problems is to just do it one step and test on inputs. That's the best and fastest way to solve imo.
November 6
- Solved CF: 1903B StORage room. Simple cute problem.
- Need to read Promises From The Ground Up
- Back to Striver. Solved some
easybinary search. - Took a couple of WAs but was able to solve this. LC: 3011. Should think about edge cases before submitting ;-;
November 5
- Solved some leetcode using rolling hash LC: 3006 and LC: 3008. Same code for LC medium and hard lol
- Today's Daily: [LC: 2914] Another easy medium. Just greedily try to build the substrings.
- Did a bit of ML: Linear Regression
- Found this cool blog on bit manip hacks
- Finished up 3 ML assignments. So tired rn...
November 4
- Learnt about String Hashing and attempted to solve 271D. It's actually pretty cool.
- Easy LC Medium: 3163
- Annoying Kattis String Hashing: Learnt about Double Hash. Code: hashing.cpp
- Worked on GrubGuide. Commits: cc4ac3e e3a0edb
November 3
- easy lc daily: LC: 796
- Following Ankush's advice started implementing simple data structures. Started working on implementing vectors in C. Added only add elements till now. It was more annoying than I expected but I like getting to use pointers again. commit: dsi: 6acd54f
- Implemented simple site to learn about LocalStorage (simple autosaving textArea)
index.html
November 2
- cheesing leetcode easy's are kinda fun tho lol. Just trying to write the most optimized version. Anyways here's my daily: LC: 2490
- Back to uni, back to grind. Need to get gud.
- Notes to myself:
- Being good at leetcode != good interview performance. Learn about time complexities of all internal operations.
- No need to have a great idea, improve the execution of the project.
- Develop self control. Results are gonna be worth it.
November 1
- Leaving tomorrow early morning so just packed up stuff.
- Solved LC: 1957. The difficulty varies way too much with Leetcode daily questions lol.
October 31
- rest day. happy diwali.
- Did get hacked on q2 of last biweekly ;-; but learnt an important lesson. Never use hashmaps over vectors unless it's absolutely required :(
October 30
- Solved: LC 1671. This was honestly a medium DP question. Doing it in reverse did make it a lot simpler.
- Upsolved: ABC 375 Spiral Matrix. Cool implementation for iterating through each layer. Learnt from aryanc403
for (int i = 0; i < n / 2; i++) {
int cnt = (i + 1) % 4;
for (int t = i; t < n - i; t++) {
v[i][t] = cnt; // marks (0,1)
v[t][i] = cnt; // marks (1,0)
v[n-1-i][t] = cnt; // marks diagonally opposite
v[t][n-1-i]= cnt; //marks diagonally opposite
}
}
October 29
- Solved: LC 2684
- Reimplementing stuff is so not fun ugh, commit: GrubGuidedb18a16
- I think after I finish the CRUD part of this, I'll just take a break from webd.
October 28
- Solved: LC 2501
- Wrote some code for my webd project: 15e3f6c
- Attempted CF Edu 171. Got tilted after I couldn't get the first question but i persevered and well able to reach pupil perf lol. Could only solve 2 tho.
- Blogs Read:
- Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map or other ordered associative container
So turns out you can supply hints and get amortized O(1) insertion into map!
- Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map or other ordered associative container
map.try_emplace(map.end(), v.key, v.value);
map.try_emplace(map.begin(), v.key, v.value);
October 27
- Visited my Dad's village today for a wedding so not much done.
- Solved: LC 1277
October 26
Solved 3 out of 4 in today's LC Biweekly! 2.7k rank. Stared at problem 2 for like 45 mins until idea hit and was solve fast. Problem 3 was nice and simple DP. Good confidence booster.
Also I'm setting up auto commit cronjobs for all of my important repos cause I'm scared of another formatting error ;-;
October 25
Traveled to home so nothing done. Reached safely π
- nvm solved LC daily: LC: 1223
October 24
- Went to lab in the morning, got 5G. Finished setting up my laptop. I genuinely forgot how much work there is to be done to set up. Atleast I had my dotfiles setup so that saved a ton work.
- On a more
positivenegative note, now my LAN and hotspot issues are still not working so I gave up started using my data as hotspot. ;-;
October 23
- bruh spent most of the day just installing my OS. Note to myself, please double check the boot media before trying to install ;-;
- On a more positive note, now my LAN and hotspot issues are fixed so that's a plus.
October 22
- It's 3:45 right now. Couldn't sleep lol. But fixed the failing tests in for my Picard PR πͺ.
commit: c82f01c - Good LC blog: General principles behind problems similar to "Reverse Pairs"
- Solved LC: 493
- Solved LC: 2583
To traverse a tree level order, just keep track of the queue size before you start and only run it for that many iterations.
queue<TreeNode*> q;
q.push(root);
while(!q.empty()) {
int size = q.size();
long long sum = 0;
while(size) {
TreeNode* temp = q.front();
q.pop();
if (temp->left) {
q.push(temp->left);
}
if (temp->right) {
q.push(temp->right);
}
size--;
}
}
October 21
Tough day ngl. When you try to help someone and mess up yourself ugh. Should've just made excuse and not go tbh.
Had Sparkplug as well which was ok ok. Prolly not good enough for second round. It's fine today I sleep early, tomorrow will be a good day!
October 20
- Solved LC: 219 just to keep the streak going.
- Today's CF contest (CF980) went bad.Could only solve one and well that killed all motivation I had for the day.
- Slept and recovered some energy. Made some commits according to phw's comments on my PR. cf267f6 47a139c d543ec0
Ending the day with a win!
October 19
- Solved LC: 56. Finally getting some confidence with interval type questions.
- Also finally averaging 100wpm on MonkeyType 60seconds. Never thought the day would come so really proud of it heh
- Made my first PR to picard! PICARD-2607: Add a β_genreβ variable #2545
- Solved 3 in Codeforces Round 979 Div 2. Rank was around 4k. Should've solved C much faster.
SpecialistAlmost Specialist perf tho (1398).
October 18
- Solved LC: 2044
- Solved GFG: Missing And Repeating
- Solved GFG: Largest subarray with 0 sum
- Solved GFG: Count Inversions. Really need to revise how to write quicksort and mergesort ;=;
October 17
- Solved LC: 670
- Solved LC: 1021
- Learnt about np.concat and searching and comparing using np array. Numpy is actually taking some time to get used to ngl.
- Solved GFG Longest Sub-Array with Sum K
- Solved GFG Maximum Score from Subarray Minimums
Just trying to finish up Striver sheet.
October 16
- Participated in Starters 156B, solved 2. Added next 2 for upsolve.
- Solved LC: 1405
- Made my first addon! It's a small one but pretty useful as it just displays the attendance percentage. I genuinely don't know why it's not already a feature.
GitHub Repo
October 15
- Went through Array Indexing and Slicing using Numpy.
- Solved LC: 2938
- Making my own sandbox for cybersec viva using ulimit, chroot and MALLOC_SIZE env var.
October 14
- Solved LC: 2530
- Upsolved Replace With First from Starters 155
- Upsolved D - ABA from Atcoder ABC 375
- Gave CF Edu 170, Solved 3/7. Perf: 1259. Should've solved B and C faster.
- Learnt basics of Numpy, np.shape, np.arange etc.
October 13
- Solved LC: 632
- Updated resume.
- Wasted around 2 hours on installing CUDA ;-;
October 12
- Solved LC: 2046
- Gave both Atcoder ABC375 (solved 2/6) and LC Biweekly 141(solved 2/4)
- Learnt about file handling in Python and with that wrapped up Intro to Python course. Was a nice refresher and I'm looking forward to learn Numpy.
- Wrote the schema for order table and added support in the frontend.