Data Structures

Create the 'data structures'-type question in the assessment.

In "Data Structures", learners have to correctly identify the order of data present in a given data structure. It presents a very interactive way of testing the data structures concepts and algorithm-building skills.

Edit mode

In the "Question Type" drop-down menu, select the required data structure: "Linked List", "Binary Tree", or "Stack".

The following template will appear if "Linked List" is selected:

Question Details

Add a description of the question and/or any images required for the data structure-related exercise.

Correct Answer

Set the values/nodes according to the solution. You can add and delete the nodes and modify the values as well. The learner's attempt must match this answer.

Initial state to be shown to user

Set the initial state of the data structure for the learners to play with. They can modify according to the given challenge.

Match node colors

Given the nature of a question, you may tick the "Match node colors" option. In this case, the nodes' colors in the solution provided by the learner must match the colors provided in the "Correct Answer".

Let’s create a sample question where learners have to identify the final state of the linked list after executing the given code, as shown below:

This view is same for other data structures as well.

Published mode

The learner only has to modify the data structure. The question will be displayed to the learner like this: