A compilation of some of the coding challenges I have encountered in my software engineering career journey. The problem sets will be touched with as many approaches as possible, brute force, recursion and so on and in the following programming languages python, c++ and javascript.
The problem statements are briefly stated in the respective files but the links to the source are also provided in those files as well as in the table below. For some of the test cases (e.g. google kickstart problems), the test sets need to be downloaded and placed in the correct path (watch this).
There will be links to detailed notes and helpful videos if it is needed to aid your understanding. Have fun just like I did!
Problem | Problem Category | Difficulty level | Solution detail |
---|---|---|---|
Two Sum is a classic array problem on LeetCode. One is tasked with determining the pair of integers in a given array such that they add up to a target | Array | Easy | Brute force the given array and find a pair using a hash table to store the indices |
Check if a linked list is palindrome is a commonly asked technical question. It involves determining whether a linked list forms a palindrome or not. | Linked List | Medium | Brute force approach stores all nodes in a stack and compares stack with linked list for a palindrome. Two-pointer approach uses two pointers where one is twice as fast as the other such that two halves of the list are compared. Recursion tranverses the list recursively to the end then compares nodes on return |
H index is a problem from Google Kickstart competition 2022. One is tasked with determining the h-index score for a stream of publications after each paper | Array | Medium | pending |
Magic Square is a problem from HackerRank. One is tasked with determining the minimum cost magic square possible given a square matrix | Array | Medium | pending |