Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexander784/data-structures-and-algoritm

A Data structures and algorithm practice for Python
https://github.com/alexander784/data-structures-and-algoritm

classes-python functions-python

Last synced: 1 day ago
JSON representation

A Data structures and algorithm practice for Python

Awesome Lists containing this project

README

        

## Data Structures and Algorithms

This repo contains Python code implementing fundamental data structurs and algorithms, along with solutions to specific programming challenges.


## Stacks
Q1 :

Balanced Expressions


mplement a function is_balanced(expression) that takes a string containing parentheses, curly braces, and square brackets and determines whether the expression is balanced

## Sequences(Lists/Tuples)
Q.2

Remove Duplicates


Write a function remove_duplicates(sequence) that takes a sequence (list or tuple) and returns a new sequence with duplicates removed while maintaining the original order of elements.

# Dictionaries
Q.3

Word Frequency

Implement a function word_frequency(sentence) that takes a sentence and returns a dictionary containing the frequency of each word in the sentence. Ignore punctuation and consider words in a case-insensitive manner.

## Author:
Alexander Nyaga.