Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A. Problem - Requirement:
- 1. Given an organization id, all the employees of the organization has to be returned.
- 2. Given an employee id, find and return the organization details.
- Sample Data:
- var people = [{
- name: 'Sandeep',
- empId: 0,
- age: 23,
- orgId: 1
- }, {
- name: 'Arjun',
- empId: 1,
- age: 25,
- orgId: 2
- }, {
- name: 'Nanha',
- empId: 3,
- age: 22,
- orgId: 1
- }, {
- name: 'Nandu',
- empId: 4,
- age: 53,
- orgId: 3
- }];
- var organizations = [{
- name: 'Razorthink',
- id: 1,
- employees: [0, 3]
- }, {
- name: 'Apple',
- id: 2,
- employees: [1]
- }, {
- name: 'Microsoft',
- id: 3,
- employees: [4]
- }];
- B. Problem - Requirement: 1. Find the max vector in each quadrant of a graph given an array of points.
- Sample Data:
- var points = [{x: 1, y: 1 }, {x: -1, y: 1 }, {x: -1, y: -1 }, {x: 1, y: -1 }, {x: 2, y: 2 }, {x: -1, y: 2 }, {x: -1, y: -2 }, {x: 1, y: -2 }, {x: 1, y: 6 }, {x: -1, y: 4 }, {x: -3, y: -1 }, {x: 1, y: -1 }, {x: 10, y: 1 }, {x: -1, y: 11 }, {x: -1, y: -1 }, {x: 1, y: -1 } ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement