Gidhub BE Developer

# 꾸준함이 실력입니다.

One Two be super Developer

2022-05-28
goodGid

## 538. Convert BST to Greater Tree

### Problem

``````Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum of all keys greater than the original key in BST.
``````

2022-05-23
goodGid

## 1260. Shift 2D Grid

### Problem

``````Given a 2D grid of size m x n and an integer k. You need to shift the grid k times.

In one shift operation:

Element at grid[i][j] moves to grid[i][j + 1].
Element at grid[i][n - 1] moves to grid[i + 1].
Element at grid[m - 1][n - 1] moves to grid.
Return the 2D grid after applying shift operation k times.
``````

2022-05-23
goodGid

## 116. Populating Next Right Pointers in Each Node

### Problem

``````You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:

struct Node {
int val;
Node *left;
Node *right;
Node *next;
}
Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.

Initially, all next pointers are set to NULL.
``````

2022-05-23
goodGid

## 131. Palindrome Partitioning

### Problem

``````Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
A palindrome string is a string that reads the same backward as forward.
``````

2022-05-22
goodGid

## 47. Permutations II

### Problem

``````Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
``````

2022-05-15
goodGid

## 802. Find Eventual Safe States

### Problem

``````There is a directed graph of n nodes with each node labeled from 0 to n - 1. The graph is represented by a 0-indexed 2D integer array graph where graph[i] is an integer array of nodes adjacent to node i, meaning there is an edge from node i to each node in graph[i].

A node is a terminal node if there are no outgoing edges. A node is a safe node if every possible path starting from that node leads to a terminal node.

Return an array containing all the safe nodes of the graph. The answer should be sorted in ascending order.
``````

Recent Posts
Categories