This project contains solutions to the Data Structure and Algorithm Challenge from the program Engineer Game
.
Sum of Natural Numbers:
- Calculate the sum of the first n natural numbers.
Maximum Number in a List:
- Find the maximum number in an unordered list.
Product of Elements in a List:
- Calculate the product of all elements in a list.
Sum of Squares:
- Calculate the sum of squares of the first n natural numbers.
Search for Element in a List:
- Implement a function to check if an element is in a list.
Check Even Number:
- Implement a function to check if a given number is even.
Check Prime Number:
- Implement a function to check if a number is prime.
Power of a Number:
- Calculate the value of a number x raised to the power n.
Divisors of a Number:
- Find all the divisors of a given integer.
Perfect Numbers:
- Find the perfect numbers in a given range.
Factorial:
- Implement a recursive function to calculate the factorial of a number n.
Fibonacci Series:
- Implement a recursive function to calculate the nth number in the Fibonacci series.
Recursive Power:
- Calculate the value of a number x raised to the power n recursively.
Sum of Elements in a List:
- Calculate the sum of all elements in a list using recursion.
Number of Paths in a Grid:
- Calculate the number of possible paths to reach the opposite corner of an m x n grid.
Sum of Numbers in a List:
- Implement a function to calculate the sum of all numbers in a list.
Remove Duplicates:
- Remove duplicate elements from a list.
Count Occurrences:
- Count how many times a specific element appears in a list.
Largest Product in a List:
- Find the largest product that can be obtained from three elements in a list of integers.
List without Even Elements:
- Create a new list with the odd elements of a given list.
Word Count:
- Count the frequency of each word in a list of words.
Grade Dictionary:
- Create a dictionary associating student names with their grades.
Count Dictionary:
- Given a list, create a dictionary that counts how many times each element appears.
Inverted Dictionary:
- Invert the keys and values of a dictionary.
Dictionary Comparison:
- Compare two dictionaries and find the keys that are common in both.
Linear Search:
- Implement a linear search to find an element in a list.
Recursive Binary Search:
- Implement binary search recursively on a sorted list.
Substring Search:
- Implement a function to search for a substring in a given string.
Matrix Search:
- Implement a search in a matrix sorted by rows and columns.
Word Search in Text:
- Search for the position of a word in a text and display the context.
Bubble Sort:
- Implement the bubble sort algorithm to sort a list of numbers.
Insertion Sort:
- Implement the insertion sort algorithm to sort a list of numbers.
Selection Sort:
- Implement the selection sort algorithm to sort a list of numbers.
Merge Sort:
- Implement the merge sort algorithm to sort a list of numbers.
Quick Sort:
- Implement the quick sort algorithm to sort a list of numbers.
Depth-First Search (DFS):
- Implement depth-first traversal in an undirected graph.
Breadth-First Search (BFS):
- Implement breadth-first traversal in an undirected graph.
Binary Search Tree (BST):
- Implement a binary search tree and perform in-order, pre-order, and post-order traversals.
Height of a Binary Tree:
- Calculate the height of a binary search tree.
Node-to-Root Path:
- Find the path from a node to the root of a binary tree.
Date | Learning |
---|---|