## removePoints

Language/Type: Java Collections Sets and Maps
Author: Marty Stepp (on 2021/04/02)

Write a method called removePoints that takes a map and an index as parameters and that removes particular points from the map returning them in a set. The map this method will manipulate uses integer indexes as keys and store as values a list of points. For example, a variable called data might store the following:

```        {17=[[x=3,y=4], [x=12,y=6], [x=8,y=12], [x=3,y=6]],
42=[[x=2,y=5], [x=3,y=3], [x=1,y=5], [x=4,y=2], [x=8,y=9]],
308=[[x=1,y=2], [x=5,y=8], [x=4,y=4], [x=2,y=7], [x=3,y=9]]}
```

This map has three entries. The first entry associates the key 17 with a list of four points. The second associates the key 42 with a list of five points. The third associates 308 with a list that also has five points.

When the method is called, it will be passed the map and a key and it will return a set of points, as in:

```        Set result = removePoints(data, 42);
```

The method should manipulate the list of points for the given index, removing any points for which the x-value is less than the y-value and returning these points in a set. After the call above, result should be:

```        [[x=2,y=5], [x=1,y=5], [x=8,y=9]]
```

and data should store the following:

```        {17=[[x=3,y=4], [x=12,y=6], [x=8,y=12], [x=3,y=6]],
42=[[x=3,y=3], [x=4,y=2]],
308=[[x=1,y=2], [x=5,y=8], [x=4,y=4], [x=2,y=7], [x=3,y=9]]}
```

Notice that the index 42 is now associated with a list of just two points (the two that weren't removed). The method should return an empty set if there are no points to remove or if the index value has no corresponding entry in the map.

Your method should construct a set to return and may construct iterators, but you are not allowed to construct other structured objects (no string, set, list, etc.).
{"ft_lang_label":"__label__en","ft_lang_prob":0.8592989,"math_prob":0.9971513,"size":1680,"snap":"2023-14-2023-23","text_gpt3_token_len":516,"char_repetition_ratio":0.14677805,"word_repetition_ratio":0.029850746,"special_character_ratio":0.34583333,"punctuation_ratio":0.17832957,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9989982,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-25T21:08:28Z\",\"WARC-Record-ID\":\"<urn:uuid:d70645e9-6bbb-4051-97cd-e6b8d6cf7097>\",\"Content-Length\":\"16799\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c20ba927-f976-4e2d-8eb8-8aead019b9c3>\",\"WARC-Concurrent-To\":\"<urn:uuid:fdd581e8-54e7-4a43-9cad-2bceffba5a53>\",\"WARC-IP-Address\":\"128.208.1.160\",\"WARC-Target-URI\":\"https://practiceit.cs.washington.edu/problem/view/cs2/sections/section18/removePoints\",\"WARC-Payload-Digest\":\"sha1:PHR4K5RNAEUPD5T733IGATMJJK4PEUIB\",\"WARC-Block-Digest\":\"sha1:IFP5ZFWMTOION5DKFH7SYHCYP77JH2QY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296945372.38_warc_CC-MAIN-20230325191930-20230325221930-00629.warc.gz\"}"}