-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
153 lines (150 loc) · 9.44 KB
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
local project_ideas = {
"Implement a sorting algorithm (Bubble Sort, QuickSort, MergeSort).",
"Create a binary search algorithm.",
"Build a maze solver using depth-first search (DFS) or breadth-first search (BFS).",
"Implement Dijkstra's algorithm for shortest path finding.",
"Create a dynamic programming solution for the Knapsack problem.",
"Build a graph traversal algorithm using BFS and DFS.",
"Implement a linked list and perform operations like insert, delete, and reverse.",
"Create an algorithm to check if a string is a palindrome.",
"Write a function to find the longest common subsequence (LCS).",
"Build a Trie data structure for fast word lookups.",
"Implement the A* (A-star) algorithm for pathfinding.",
"Create an algorithm to detect cycles in a graph.",
"Write a program to find the factorial of a number using recursion.",
"Develop a binary search tree (BST) with insertion, deletion, and search functions.",
"Implement a heap data structure and a heap sort algorithm.",
"Build a hash map from scratch.",
"Write an algorithm to merge two sorted arrays.",
"Implement the Floyd-Warshall algorithm for all-pairs shortest paths.",
"Create a program to solve the N-Queens problem.",
"Write an algorithm for finding the next permutation of a number.",
"Implement a function to find the kth smallest element in an unsorted array.",
"Create an algorithm to check if a number is prime.",
"Implement a program to generate all permutations of a string.",
"Create an algorithm to find the longest increasing subsequence in an array.",
"Write a program that implements the Sieve of Eratosthenes for finding prime numbers.",
"Build a program to solve the traveling salesman problem using brute force and dynamic programming.",
"Create an algorithm to count the number of inversions in an array.",
"Implement a program to solve the 0/1 knapsack problem.",
"Write an algorithm to find the median of two sorted arrays.",
"Create a program that finds the common elements between two arrays.",
"Implement a program to reverse a linked list.",
"Write an algorithm to find the maximum subarray sum (Kadane’s algorithm).",
"Build an algorithm to generate all subsets of a set.",
"Create a program to perform a binary search in a rotated sorted array.",
"Write a function to find the longest palindromic substring.",
"Implement an algorithm for finding the top K frequent elements in an array.",
"Create a program to implement a Fibonacci heap.",
"Write a program to calculate the power of a number using recursion.",
"Build a function to solve the Tower of Hanoi problem.",
"Create an algorithm to detect whether a number is a happy number.",
"Write a program to find the largest prime factor of a number.",
"Implement a program to compute the GCD (Greatest Common Divisor) of two numbers using Euclid’s algorithm.",
"Build a program to check if a string contains all unique characters.",
"Write a program to remove duplicates from a sorted linked list.",
"Create an algorithm to compute the edit distance between two strings.",
"Write an algorithm to check if a number is a power of two.",
"Build a program to find the longest word in a dictionary that can be formed by characters of a string.",
"Implement an algorithm to solve the 8-puzzle problem.",
"Create an algorithm to generate all valid parentheses combinations.",
"Write an algorithm to check if two strings are anagrams.",
"Build a program to find the minimum number of coins for a given amount.",
"Implement the Bellman-Ford algorithm for shortest paths.",
"Create a program to find the largest rectangle in a histogram.",
"Write an algorithm to implement a depth-first search on a graph.",
"Implement a program to generate all prime numbers up to a given number using the Sieve of Eratosthenes.",
"Write an algorithm to find the intersection of two arrays.",
"Create a program to implement the Floyd-Warshall algorithm for shortest path finding.",
"Build a program to implement a queue using two stacks.",
"Write an algorithm to calculate the sum of digits of a number.",
"Implement an algorithm to generate Pascal’s triangle up to n rows.",
"Create a program to find the longest consecutive subsequence in an array.",
"Build a function to find the first non-repeating character in a string.",
"Implement a program to solve Sudoku using backtracking.",
"Create a program to perform matrix multiplication.",
"Write a function to rotate a matrix by 90 degrees.",
"Implement a program to check if a given string is a valid palindrome with non-alphanumeric characters ignored.",
"Build a simple text-based adventure game.",
"Create a basic simulation of a traffic light system.",
"Build a simple rock-paper-scissors game with AI.",
"Develop a number guessing game with varying levels of difficulty.",
"Create a virtual pet game where the pet grows based on user interaction.",
"Build a simple memory matching card game.",
"Create a simple hangman game.",
"Make a countdown timer app.",
"Build a quiz game with different question categories.",
"Create a word search puzzle generator.",
"Develop a Tic-Tac-Toe game with a minimax algorithm for AI.",
"Build a Sudoku solver app.",
"Create a simple game of chess with basic AI.",
"Develop a Minesweeper game with a simple AI.",
"Build a calculator that solves complex equations.",
"Make a calculator that can solve polynomial expressions.",
"Create a maze generator and solver game.",
"Build a simple blackjack game.",
"Make a 2D platformer game with basic physics.",
"Create a memory game that challenges users with patterns.",
"Build a trivia quiz game with a score tracker.",
"Make a chess puzzle solver.",
"Create a Snake game with keyboard input.",
"Develop a simple Pong game using graphics.",
"Build a digital clock with a countdown feature.",
"Create a random joke generator.",
"Make a program that generates random passwords.",
"Develop a palindrome checker game.",
"Create an anagram solver.",
"Build a calculator that can evaluate simple arithmetic expressions.",
"Make a program that converts numbers between different number systems (binary, decimal, hexadecimal).",
"Create a program that finds Fibonacci numbers up to a certain limit.",
"Build a basic text-based role-playing game (RPG).",
"Create a tower defense game where players build towers to prevent enemies from reaching a destination.",
"Develop a simple visualizer for prime number generation.",
"Create a program that implements Conway’s Game of Life.",
"Build a graph visualizer that shows various graph traversal algorithms.",
"Develop a program that simulates an ATM transaction system.",
"Create a virtual pet that evolves based on user interactions.",
"Make a physics-based simulation of a bouncing ball.",
"Create a simple flight booking system simulation.",
"Develop a blackjack game with betting.",
"Build a program to simulate the game of life using cellular automata.",
"Create a spaceship shooter game with levels and power-ups.",
"Make a 3D Tic-Tac-Toe game using basic 3D graphics.",
"Create a visual simulation of a sorting algorithm.",
"Build a timer-based game with levels and challenges.",
"Create a simple word generator using random letters.",
"Build a text-based puzzle game.",
"Create a number series generator (Fibonacci, primes, etc.).",
"Make a card matching game where the player has to match pairs of cards.",
"Build a trivia game that stores high scores.",
"Create a space invader-style game with user controls.",
"Develop a puzzle-solving game like Sliding Puzzle or Jigsaw Puzzle.",
"Build a traffic simulation system where cars follow rules of the road.",
"Make an app that converts units of measurement (length, mass, volume).",
"Create a music playlist manager with a shuffle algorithm.",
"Make a countdown timer that can be set by the user.",
"Build a program to simulate a dice roll with multiple dice.",
"Create a simple random name generator.",
"Build a Mad Libs generator with random word selection.",
"Create a random number generator with a user-specified range.",
"Develop a program that generates a random quiz question.",
"Make a game where the user has to guess a number between a range.",
"Build a program that simulates the classic Minesweeper game.",
"Create a website that allows users to play simple text-based games.",
"Build a social network simulation with users and messages.",
"Create a puzzle game that involves arranging scrambled pieces.",
"Develop an interactive map to solve maze challenges.",
"Make a program to simulate a dice-based board game.",
"Create a trivia quiz app with categories and timers.",
"Develop a tic-tac-toe game with multiplayer support.",
"Build a maze-solving robot simulation in 2D.",
"Create a simulation of a soccer penalty shootout game.",
"Build an interactive quiz with randomized questions and answers.",
"Create a simulation of Conway's Game of Life with interactive features."
}
function getRandomProject(ideas)
local random_index = math.random(1, #ideas)
return ideas[random_index]
end
local selected_project = getRandomProject(project_ideas)
print("Your random coding project idea is: " .. selected_project)