June LeetCoding Challenge
Inspiration
I wanted to improve my problem solving skills, so found this challenge posted at LeetCode.
Getting Started with Challenge
The first step is to visit LeetCode
Coding Problems
Problem1: Invert Binary Tree
My commentary:
- This is a problem related to Binary Trees. Standard Data Structure, having left child node & right child node.
- The solution has a recursive nature, where inversion is performed for each node, recursively.
- By inversion , it means that, for a given node, the left child becomes right child & right child becomes left child.
Problem2: Delete Node in a Linked List
My commentary:
- This is a problem related to LinkedLists. Standard Data Structure, having next node and value for a given node.
- Firstly, we might confuse ourselves with the assumption that, head of the linked list is given by default, this is where we need to be careful. We are just given a node and nothing else, and ofcourse the definition of linked list is provided in code section.
- We can think, what we can do with the given node? What can we do, if we know the next node.
Current Status of the challenge - Solved 2 problems
Github Project
I am publishing the solutions to github repository at june-leetcoding-challenge
Written on June 2, 2020
comments powered by Disqus