# Languages-Java [3i Infotech Placement]: Sample Questions 111 - 115 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

## Question 111

## Question 112

## Question 113

Java

### Explanation

- Variable used for set of requests or for a single site visit is known as session variable.
- For example, user selection in a shopping cart stored with the help of session.

Two functions are associated with session variable:

## Question 114

## Question 115

Java

### Explanation

**In-Order Traversal**:

- The left subtree is visited first, then the root and later the right sub-tree.
- Outputs sorted key values in ascending order.

**Algorithm**

- Recursively traverses left subtree.
- Visit root node.
- Recursively traverse right subtree.

**Pre-order Traversal**:

- Root node is visited first, then the left subtree and finally the right subtree.

**Algorithm**:

- Visit root node.
- Recursively traverse left subtree.
- Recursively traverse right subtree.

**Post-order Traversal**

- The root node is visited last, hence the name.
- First we traverse the left subtree, then the right subtree and finally the root node.

**Algorithm**:

- Recursively traverse left subtree.
- Recursively traverse right subtree.
- Visit root node.