lab1spr12.001

lab1spr12.001 - CSE 2320-001 Lab Assignment 1 Due February...

This preview shows pages 1–2. Sign up to view the full content.

CSE 2320-001 Lab Assignment 1 Due February 9, 2012 Goals: 1. Application of sorting. 2. Application of binary search. Requirements: 1. Design, code, and test a C program to perform range queries for two dimensional point data. The first line of the input will be n , the number of integer coordinate pairs in the next n input lines. n will not exceed 5000. Each of the remaining lines will have four values giving the coordinates of the lower left point and upper right point of a bounding box . The last input line will be -1 -1 -1 -1 . All input point coordinates will be in the range 0 . . 1000 , inclusive. The input should be read from standard input ( stdin ). Your code should preprocess (sort) the points and use O( m + log n ) time to process each query, where m is the the number of points in the smaller of the horizontal and vertical “slabs”. For each query you should output 1) m , 2) the coordinates of the points in the answer, and 3) the number of points in the answer.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/25/2012 for the course CSE 2320 taught by Professor Bobweems during the Spring '12 term at UT Arlington.

Page1 / 2

lab1spr12.001 - CSE 2320-001 Lab Assignment 1 Due February...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online