Skip to content Skip to sidebar Skip to footer
Showing posts with the label Data Structures

Find Two Numbers In Array Such That All Elements Between Them Is Smaller Than Smallest Of Two Number

how to find pairs in array such that the elements which are between them are smaller than smallest … Read more Find Two Numbers In Array Such That All Elements Between Them Is Smaller Than Smallest Of Two Number

Data Structure In Python

names=['Peter', 'John'] size = ['X', 'M', 'L'] list_price =… Read more Data Structure In Python

Parsing A Chemistry Formula In Python

I am trying to solve this problem: https://leetcode.com/articles/number-of-atoms/#approach-1-recurs… Read more Parsing A Chemistry Formula In Python

Python Get Random Key In A Dictionary In O(1)

I need a data structure that supports FAST insertion and deletion of (key, value) pairs, as well as… Read more Python Get Random Key In A Dictionary In O(1)

Python: Expanding Complicated Tree Datastructure

I am exploring a data structure which get expands to sub-elements and resolves to a final element. … Read more Python: Expanding Complicated Tree Datastructure

How Does Python Manage A 'for' Loop Internally?

I'm trying to learn Python, and I started to play with some code: a = [3,4,5,6,7] for b in a: … Read more How Does Python Manage A 'for' Loop Internally?