(This question is a variation of the LeetCode question 2408. Design SQL. If you haven't completed that question yet, it is recommended to solve it first.)
Design an in-memory SQL database system that supports creating tables, inserting data with dynamic type inference, and performing queries with filtering and sorting capabilities.
Implement the SQLManager class:
-
SQLManager()Initializes the empty database system. -
void createTable(String tableName, List<String> columnNames)Creates a new table with the giventableNameand a list of fixedcolumnNames.- The
tableNameis guaranteed to be unique. - Columns are initially untyped, but data inserted will be inferred as either integers or strings.
- The
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected