Open in app

Sign In

Write

Sign In

ad1tyaV
ad1tyaV

Home

About

May 19, 2022

Moving to a new city — USA

I recently moved to a new city for work, to Chicago, from Philadelphia. Moving to a new city is daunting and requires some planning if you don’t have acquaintances in the city you’re moving to. There are two important things in this transition, Packing + Shipping followed by Setting up…

Moving

2 min read

Moving to a new city — USA
Moving to a new city — USA
Moving

2 min read


Aug 2, 2021

Generate-Parentheses Brute Force to Optimal Leetcode

We use backtracking in brute force approach 1) We make a choice and hope it’s a valid one, if it happens to be valid we proceed forward 2) If the option we chose earlier happens to be wrong we go back one step to pick alternate choice, If we run out…

Generate Parenthesis

1 min read

Generate Parenthesis

1 min read


Jul 1, 2021

Find if two nodes are cousins in Binary Tree

We say two nodes in a binary tree are cousins if they are on same level but have different parents Algorithm: Find the parent nodes and levels of the given nodes Store these in a pair to compare If they happen to have different parents and same level, then they are cousins, else they are not! The code should be self explanatory. Thanks for Reading!!1

Binary Tree

1 min read

Find if two nodes are cousins in Binary Tree
Find if two nodes are cousins in Binary Tree
Binary Tree

1 min read


Jun 13, 2021

Rotting Oranges Leetcode

Rotting Oranges - LeetCode You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing…leetcode.com This is one of the classic BFS Problems(I guess you could solve using DFS too) and a great one too. Here’s one of the ways to solve it. I started out with keeping track of rotten orange’s co-ordinates(x,y) and freshOranges by traversing through the Grid

Leetcode

1 min read

Rotting Oranges Leetcode
Rotting Oranges Leetcode
Leetcode

1 min read


Jun 8, 2021

Diagonal Traversal of Matrix using DFS

I’ve encountered this problem in an Online Assessment(OA), the requirement was not exactly traversing diagonally, but I had to do something traversing diagonally. Thinking about it during my OA hurt my brain, I had to think, after I put decent amount of thought into it, I was able to write…

Arrays

2 min read

Diagonal Traversal of Matrix using DFS
Diagonal Traversal of Matrix using DFS
Arrays

2 min read

ad1tyaV

ad1tyaV

Following
  • djai

    djai

  • Anjali Viramgama

    Anjali Viramgama

  • Salil Arora

    Salil Arora

  • Aishna Gupta

    Aishna Gupta

  • Dariusz Kuc

    Dariusz Kuc

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech