Category "find-occurrences"

Count Occurrences of Seven Integers in Array

I have written the code below and it has comments attached. The application is to read seven integers entered by the user. The application then prints out the n

Finding how many times a given string is a substring of another string using scala

what is the elegant way for finding how many times a given string is a substring of another string using scala? The below test cases that should make clear wh

Counting number of co-occurrences of words for a specified vocabulary and within a specified radius?

I have a vocabulary V = ["anarchism", "originated", "term", "abuse"], and list of words test = ['anarchism', 'originated', 'as', 'a', 'term', 'of', 'abuse', 'fi