Skip to content

GakuruAlex/frogs_insects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Frog catching Insects Problem

Problem Statement

You are given:

A list of frogs' locations.
A corresponding list of tongue sizes for each frog.
A list of insect locations.

The $i^{th}$ frog catches the $j^{th}$ insect if (insectj - frogi) <= tonguei

Find the output a list of integers where the $i^{th}$ element represents the number of insects caught by the $i^{th}$ frog.

Constraints

Each frog's tongue size is a positive integer (0 < N < 105).

All locations (frogs and insects) are integers.

Insects may fall into the catch range of multiple frogs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published