DEV Community

Cover image for #Week 1/14 : 100 Days of Code
random
random

Posted on • Edited on

#Week 1/14 : 100 Days of Code

Day 1

I made my fist official twitter bot yesterday - "100 Days of Words" and it was super fun! The bot tweets words to help you improve your vocabulary. You can find it here.

I spent a lot of time today making a tutorial on how to use 1 twitter developer account to tweet in a different bot account. I couldn't find a detailed tutorial on this issue anywhere since Twitter API currently doesn't provide a UI for authorisation of other apps.

I'm planning on learning sorting and searching this week. To start off, I did Aggressive Cows problem - an application of binary search.

Learnings:

  1. Don't forget to sort array before doing binary search 🤦‍♀️
  2. Draw rough tree diagrams for test cases and understand the actual flow of the code during binary search
  3. Make sure you have correctly translated your logic into code (ex: conditional statements)
  4. Iterative solution cleaner than recursive here.

In a nutshell, be attentive when you code. 😂

Day 2

Yay! Today I got an opportunity to do an ML internship. It's about predicting component failures in a compressor. To be honest, I don't have any experience with ML - so I'm scared. But I really want to do and complete a project fully.

I did 2 problems relates to merge sort - Inversion Count and Murder problem. I also checked out react's set state function and read an interesting article about unidirectional flow of data in JS.

image

Day 3

I spent a lot of time studying compressors. It's a humongous machine and there's a lot of data involved. I'll have to go step by step.

I did 2 more application questions of binary search, a problem using STL lower_bound and STL sort and 2 pointer problem. It's kind of interesting to see how we can modify solutions to use binary search:

  1. using prefix sum array - we have a given X - we use binary search to find index where sum<=X. It's an interesting case. If we find a mid where sum<=X we have to check mid+1 and stop the search only if mid+1's sum>X.
  2. developing an equation - A sliding window kind of problem. We make a statement saying our time lies between 0 and 10^9. We do binary search to find the time where our conditions satisfy.

I finished the intro to ML course in Kaggle. It's interesting.

Day 4

Merry Christmas! My favourite time of the year. I had an amazing time spending time with everyone and eating lots of amazing food especially plum cakes.

I got some time in the evening to code. I started the Intermediate ML course in Kaggle and also started learning the basics of NumPy and Pandas.

Day 5

I implemented merge sort and quick sort. I love the thought process behind these 2 sorting algorithms.

I have my internal exams for Microprocessors and Soft Computing coming up in 2 days. So I started my exam prep.

I spent more time exploring NumPy and enrolled myself in Andrew Ng's Machine Learning course. I also applied for a MATLAB license. Now back to exam prep.

Day 6

I did a few recursion questions -

  • return subsequences of string
  • print subsequences of string
  • return keypad combinations
  • print keypad combinations

Christmas aftermath. Tomorrow is Microprocessors exam. So spent the rest of the day reading about 8259A, 8257, 8255 ,I/O Mapped vs Memory Mapped interfacing, 8086 interrupts and what not.

Day 7

I had Microprocessors exam in the morning - it was lengthy but thankfully I had checked a few university question papers and gone through the lecture slides.

I did a Backtracking problem - NQueens problem. Backtracking is an approach wherein you explore all possible paths. It is implemented via recursive algorithms. Tomorrow I have soft computing exam. So got to learn for that. Tomorrow is also internship day 1. Fingers crossed.

Until Next Time,
@stratospher

Top comments (0)