Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 510 Bytes

README.md

File metadata and controls

14 lines (12 loc) · 510 Bytes

Substrings anagrams

Java exercise to improve my skills:

This is not a normal anagram counter. Here we are looking for SUBSTRINGS (inside a bigger string) that have the same characters, they are anagrams of each other.

Examples:

  • Input: "ovo" Output: 2 || ['o', 'o,] and ['ov', 'vo']
  • Input: "ifailuhkqq" Output: 3 || ['i', 'i'], ['q', 'q'] and ['ifa', 'fai']

How to use:

  • In terminal: "javac Anagrams.java"
  • "java Anagrams"
  • It will ask for an input "string"
  • Result