Skip to content

alexei-osipov/signalFilterTest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal Filter Test Assignment

External system generates signals at random intervals. You need to implement Java filter that accepts at most N signals per minute (at any time).

Filter must implement the following interface:

	interface Filter {
		boolean isSignalAllowed();
	}

The following pseudo-code illustrates how your filter could be used:

	Filter frequencyFilter = new YourFilter(N); 
	while (true) {
		Signal signal = waitForSignal();
		if (frequencyFilter.isSignalAllowed()) {
		   process (signal);
		}
	}

Implementation must be efficient and thread-safe. Parameter N can be a immutable for lifetime of the filter. Another example can be found here.

If you have questions don't hesitate to ask.

About

Test assignment (simple signal filter)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%