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

Merging K Sorted Lists Using Heapq Module In Python3

Problem:- merge k sorted lists. I want to solve this problem using min heap which can be implemente… Read more Merging K Sorted Lists Using Heapq Module In Python3

Circular Queue Python

I am trying to make a circular queue in Python so that when the last element in the array is reache… Read more Circular Queue Python

Group Similar Dict Entries As A Tuple Of Keys

I would like to group similar entries of a dataset. ds = {1: 'foo', 2: 'bar',… Read more Group Similar Dict Entries As A Tuple Of Keys

Parsing Json Nested Dictionary Using Python

I have the following nested Dictionary in JSON. If I want to get 'id', 'self', '… Read more Parsing Json Nested Dictionary Using Python

Sys.getsizeof() Results Don't Quite Correlate To Structure Size

I am trying to create a list of size 1 MB. while the following code works: dummy = ['a' for… Read more Sys.getsizeof() Results Don't Quite Correlate To Structure Size

Adjacency List And Adjacency Matrix Are Able To Logically Present A Non-linear Data Structure

how adjacency list and adjacency matrix are able to logically present a non-linear data structure, … Read more Adjacency List And Adjacency Matrix Are Able To Logically Present A Non-linear Data Structure

Create A List Like Object Using A Bitarray

I need to track a set of perhaps 10 million numbers in Python. (All numbers are between 0 and 2^32… Read more Create A List Like Object Using A Bitarray

Finding The Max Of Each Continguous Subarray Of A Given Size

I'm trying to solve the following problem in Python Given an array and an integer k, find the … Read more Finding The Max Of Each Continguous Subarray Of A Given Size