Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions computer-science/light-cs/answers/guillaume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
What is time complexity?
Time complexity measures how the runtime of an algorithm grows as the input size increases. It's expressed using Big O notation (like O(n), O(log n), O(n²)) to describe the worst-case scenario. It helps compare algorithm efficiency regardless of hardware or implementation details.

What is space complexity?
Space complexity measures how much additional memory an algorithm uses as the input size increases. Like time complexity, it's expressed in Big O notation and includes both auxiliary space used by the algorithm and the space needed to store the input.

What is a pointer and reference?
A pointer is a variable that stores the memory address of another variable, allowing indirect access to that variable's value. A reference is an alias for an existing variable - it's another name for the same memory location. Pointers can be reassigned and may be null, while references must be initialized and cannot be changed.

What is a data structure? What are the types of data structures?
A data structure is a way of organizing and storing data to enable efficient access and modification. Types include linear structures (arrays, linked lists, stacks, queues) and non-linear structures (trees, graphs, hash tables). They can be primitive (integers, characters) or non-primitive (arrays, objects).

What is a call stack? Why is it important?
A call stack is a data structure that tracks function calls in a program. When a function is called, it's pushed onto the stack; when it returns, it's popped off. It's important because it manages function execution order, stores local variables and return addresses, and helps with debugging by showing the sequence of function calls that led to an error.