Algorithms

### [LeetCode 1648] Sell Diminishing-Valued Colored Balls

References: https://leetcode.com/problems/sell-diminishing-valued-colored-balls/ https://www.youtube.com/watch?v=7_QGT_LcbIQ https://stackoverflow.com/questions/10882645/is-there-a-faster-way-to-sum-up-an-arithmetic-sequence-of-numbers-in-python
Algorithms

### [LeetCode 472] Concatenated Words

References: https://leetcode.com/problems/concatenated-words/ Time complexity: , where is the length of the input word ...
Algorithms

### [LeetCode 1091] Shortest Path in Binary Matrix

References: https://leetcode.com/problems/shortest-path-in-binary-matrix/ Solution
Algorithms

### [LeetCode 957] Prison Cells After N Days

Solution Overview First of all, one can consider this problem as a simplified ...
Algorithms

### [LeetCode 1135] Connecting Cities With Minimum Cost

References https://leetcode.com/problems/connecting-cities-with-minimum-cost/ https://www.youtube.com/watch?v=GFsPyTdCS1I Solution Approach 1: Minimum Spanning Tree (Using Kruskal’s algorithm) Intuition ...
Computer Science Topics

### Python – Remove first element of list

Queue data structure is very well known data structure, lists in Python usually ...
Computer Science Topics

### Python Dictionary pop()

The pop() method removes and returns an element from a dictionary having the ...
Algorithms

### [LeetCode 1629] Slowest Key

A newly designed keypad was tested, where a tester pressed a sequence of n keys, ...
Algorithms

### LeetCode 837. New 21 Game.

Alice plays the following game, loosely based on the card game “21”. Alice ...
Algorithms

### [LeetCode 1104] Path in ZigZag Labelled Binary Tree

In an infinite binary tree where every node has two children, the nodes ...