Is Lua good for data structures and algorithms?
For learning them, surprisingly good: with only tables to build from, every structure is explicit, and the code stays short. The catch is that tables forgive mistakes quietly: arrays start at 1 by convention, a missing key returns nil instead of an error, and the length operator #t is only reliable on a sequence without nil holes. Few interviews are held in Lua, so if one is your goal, the interview packs are also offered in the language you will use there.
How do you build a stack and a queue from a Lua table?
A stack is the array part used from one end: table.insert(t, x) pushes and table.remove(t) pops. A queue needs more care, because table.remove(t, 1) shifts every remaining element down one place, so each dequeue is O(n). Keep two indices instead, first and last: add at last + 1, read at first, set that slot to nil and advance, and dequeueing becomes constant time. Step one has you build both.
Why does #t sometimes give the wrong length in Lua?
Because # returns a border of the table: an index n where t[n] is not nil and t[n + 1] is. A proper sequence has exactly one border, its length; put a nil in the middle and there can be several, and # may return any of them. So never store nil in an array you measure with #, and in structures with gaps, such as a queue with two indices, track the size yourself.
Do data structures matter for Roblox scripting?
Yes, once a game grows past a handful of objects. An inventory is a hash table, a spawn or turn order is a queue, a list of cooldowns can be a priority queue, and finding a path across a map is a graph search. Luau, the language Roblox scripts are written in, is derived from Lua 5.1 and keeps its tables, 1-based arrays and # operator, so what you build here carries straight over.
Which courses on this path are not taught in Lua?
Three: dynamic programming and the Python interview series, taught in Python, and bit manipulation, taught in C++. They are listed after the steps, each with a link that opens it in its own language. A memo in Lua is a table; bitwise operators only arrived in Lua 5.3, which has C++'s &, |, << and >> and writes both XOR and NOT as ~.
Do I need to know Lua before starting this path?
Tables, functions, loops and local variables, at least; metatables help if you want structures that behave like objects. If those are new, Coddy's Lua course covers them first, free, and this path picks up where it ends.