Posts for: #leetcode

Leetcode Grind Day 3

Leetcode Grind Day 3
I have taken a few days off from the grind. I’ve been looking at purchasing my first home 🏡. Today’s leetcode problem. We are given an array of integers nums, and an integer target. We need to return the indices of two numbers such that they add up to target. The constraints say that there will always be one valid answer in the given integer array. My first thought is to use a nested for loop to starting iterating from index 0, and a secondary iterator to go down the list.
Read more →

Leetcode Grind Day 1

Leetcode Grind Day 1
It’s time to grind ladies and gentleman. I’m starting out with an easy leetcode problem today. Going to work my way up to harder problems as the days go on. Today’s problem, finding the middle of singly linked list. Singly Linked List This data structure is a unidirectional form of the linked list. It can only be traversed from one direction (head to tail nodes). H e 1 a d 2 3 T a i l 4 N U L L Each node in the list has two pointers.
Read more →