0% found this document useful (0 votes)
16 views1 page

Set 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Set 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Questions

1. A and B are two friends. B has a disorder while reading, where he reads
each word from right to left. Though B reads some words correctly as A.
Given list of words find which words can be read correctly by B?

2. Given an integer list, find the number of sub list with 3 integers(list[i], list[j],
list[k]) such that i < j < k and list[i] < list[k] < list[j]

3. Given list of coordinates, where coordinates[i] = [x, y], where x and y are
coordinate of a point. Return true if these coordinates make a straight line.

4. Implement a list using array of size 2 & write a function to traverse it.

5. There are n people. Each person has to send a gift and also receive a gift.
Construct a data structure that disallows a single person from sending /
receiving more than 1 gift.

6. Given an list of integers, return true if


A) list.count >= 3
B) there exists index i such that
list[0] < list[1] < .... < list[i] and
list[i] > list[i+1] > ... > list[list.count - 1]

You might also like