Channel: Programming Challenges
BELLMAN-FORD
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a directed graph represented by an adjacency matrix and a source vertex, implement a function that finds the shortest path from the source vertex to all other vertices using the Bellman-Ford algorithm.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a directed graph represented by an adjacency matrix and a source vertex, implement a function that finds the shortest path from the source vertex to all other vertices using the Bellman-Ford algorithm.
+========+
Please answer to this message with your solution 🙂
GREEDY ALGORITHM
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a set of items, each with a value and a weight, and a knapsack with a maximum weight capacity, implement a function that finds the maximum value that can be placed in the knapsack using a greedy algorithm.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a set of items, each with a value and a weight, and a knapsack with a maximum weight capacity, implement a function that finds the maximum value that can be placed in the knapsack using a greedy algorithm.
+========+
Please answer to this message with your solution 🙂
PRIM'S ALGORITHM
+========+
Time: 1 hour - 2 hours
Difficulty: Hard
Languages: Any
+========+
Given an undirected graph represented by an adjacency matrix, implement a function that finds the minimum spanning tree using the Prim's algorithm
+========+
Please answer to this message with your solution 🙂
+========+
Time: 1 hour - 2 hours
Difficulty: Hard
Languages: Any
+========+
Given an undirected graph represented by an adjacency matrix, implement a function that finds the minimum spanning tree using the Prim's algorithm
+========+
Please answer to this message with your solution 🙂
BFS
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a graph represented by an adjacency list and a starting vertex, implement a function that performs a breadth-first search of the graph and returns a list of the visited nodes
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a graph represented by an adjacency list and a starting vertex, implement a function that performs a breadth-first search of the graph and returns a list of the visited nodes
+========+
Please answer to this message with your solution 🙂
DEPTH-FIRST SEARCH
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a graph represented by an adjacency list, implement a function that performs a depth-first search of the graph, and returns a list of the visited nodes.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a graph represented by an adjacency list, implement a function that performs a depth-first search of the graph, and returns a list of the visited nodes.
+========+
Please answer to this message with your solution 🙂
GRADIENT DESCENT
+========+
Time: 1 hour - 2 hours
Difficulty: Hard
Languages: Any
+========+
Given a set of data points and a cost function, implement a function that finds the minimum of the cost function using gradient descent algorithm.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 1 hour - 2 hours
Difficulty: Hard
Languages: Any
+========+
Given a set of data points and a cost function, implement a function that finds the minimum of the cost function using gradient descent algorithm.
+========+
Please answer to this message with your solution 🙂
HUFFMAN CODING
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a string of characters, implement a function that performs Huffman coding on the string to compress it.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a string of characters, implement a function that performs Huffman coding on the string to compress it.
+========+
Please answer to this message with your solution 🙂
BUBBLE SORT
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a list of integers, implement a function that performs a bubble sort on the list
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a list of integers, implement a function that performs a bubble sort on the list
+========+
Please answer to this message with your solution 🙂
QUICKSORT
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of integers, implement a function that performs a quicksort on the list
+========+
Please answer to this message with your solution 🙂
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of integers, implement a function that performs a quicksort on the list
+========+
Please answer to this message with your solution 🙂
Dijkstra's Shortest Path
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a directed graph represented by an adjacency matrix and a source vertex, implement a function that finds the shortest path from the source vertex to all other vertices using Dijkstra's shortest path algorithm
+========+
Please answer to this message with your solution 🙂
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a directed graph represented by an adjacency matrix and a source vertex, implement a function that finds the shortest path from the source vertex to all other vertices using Dijkstra's shortest path algorithm
+========+
Please answer to this message with your solution 🙂
TOWER OF HANOI
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a tower of n discs stacked in decreasing order of size and 3 pegs, implement a function that solves the tower of Hanoi puzzle by moving the discs from the first peg to the last peg with the help of the middle peg.
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a tower of n discs stacked in decreasing order of size and 3 pegs, implement a function that solves the tower of Hanoi puzzle by moving the discs from the first peg to the last peg with the help of the middle peg.
+========+
Please answer to this message with your solution 🙂
FIBONACCI SEQUENCE
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a number n, implement a function that returns the nth number in the Fibonacci sequence using recursion
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a number n, implement a function that returns the nth number in the Fibonacci sequence using recursion
+========+
Please answer to this message with your solution 🙂
HEAP SORT
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of integers, implement a function that performs a heap sort on the list
+========+
Please answer to this message with your solution 🙂
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of integers, implement a function that performs a heap sort on the list
+========+
Please answer to this message with your solution 🙂
K-MEANS CLUSTERING
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a set of points in two-dimensional space, implement a function that performs k-means clustering on the set, using the Lloyd's algorithm
+========+
Please answer to this message with your solution 🙂
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a set of points in two-dimensional space, implement a function that performs k-means clustering on the set, using the Lloyd's algorithm
+========+
Please answer to this message with your solution 🙂
BINARY SEARCH
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a sorted list of integers, implement a function that performs a binary search on the list and returns the index of the element if found or -1 if not found
+========+
Please answer to this message with your solution 🙂
+========+
Time: 30 minutes
Difficulty: Easy
Languages: Any
+========+
Given a sorted list of integers, implement a function that performs a binary search on the list and returns the index of the element if found or -1 if not found
+========+
Please answer to this message with your solution 🙂
A* SEARCH
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a graph represented by an adjacency matrix and a starting and goal vertex, implement a function that finds the shortest path from the starting vertex to the goal vertex using A* search algorithm
+========+
Please answer to this message with your solution 🙂
+========+
Time: 2 hours - 3 hours
Difficulty: Hard
Languages: Any
+========+
Given a graph represented by an adjacency matrix and a starting and goal vertex, implement a function that finds the shortest path from the starting vertex to the goal vertex using A* search algorithm
+========+
Please answer to this message with your solution 🙂
FOURIER TRANSFORM
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a sequence of complex numbers, implement a function that performs a Fourier transform on the sequence using the Fast Fourier Transform algorithm
+========+
Please answer to this message with your solution 🙂
+========+
Time: 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a sequence of complex numbers, implement a function that performs a Fourier transform on the sequence using the Fast Fourier Transform algorithm
+========+
Please answer to this message with your solution 🙂
Please open Telegram to view this post
VIEW IN TELEGRAM
Palindrome Checker with Wildcard
Time: 45 minutes
Difficulty: Easy/Medium
Languages: Any
====================
Given a string that may contain lowercase English letters and a special wildcard character '*', implement a function that determines if the string is a palindrome. The wildcard character '*' can match any single character.
For example:
- "racecar" is a palindrome.
- "r*cecar" is a palindrome ('*' matches 'a').
- "r*cec*r" is a palindrome (both '*' match 'a').
- "hello" is not a palindrome.
- "h*llo" is not a palindrome (no single character can make it a palindrome).
- "a*" is a palindrome ('*' matches 'a').
- "*" is a palindrome ('*' matches itself or any single character).
Write a function
====================
Please answer to this message with your solution 💡❤️🚀
Time: 45 minutes
Difficulty: Easy/Medium
Languages: Any
====================
Given a string that may contain lowercase English letters and a special wildcard character '*', implement a function that determines if the string is a palindrome. The wildcard character '*' can match any single character.
For example:
- "racecar" is a palindrome.
- "r*cecar" is a palindrome ('*' matches 'a').
- "r*cec*r" is a palindrome (both '*' match 'a').
- "hello" is not a palindrome.
- "h*llo" is not a palindrome (no single character can make it a palindrome).
- "a*" is a palindrome ('*' matches 'a').
- "*" is a palindrome ('*' matches itself or any single character).
Write a function
is_wildcard_palindrome(text: str) -> bool
that returns True
if the string is a palindrome considering the wildcard, and False
otherwise.====================
Please answer to this message with your solution 💡❤️🚀
HTML Embed Code: