Skip to content

ZeyadAlQutaifan/String-Function-Calculation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maximum Substring Value Finder

This Java program finds the maximum value of a substring within a given string. It calculates the value of each substring based on the frequency of its occurrences in the string multiplied by its length.

Features

  • Substring Value Calculation: Calculates the value of each substring based on its length and frequency of occurrences within the string.
  • Input Handling: Utilizes the Scanner class for user input, ensuring flexibility in input string.
  • Algorithm:
    • Iterates through each character in the input string.
    • Calculates the frequency of each substring and its length.
    • Determines the maximum value of substrings encountered.

Usage

To use the program, compile the Main.java file and execute the generated class file. Follow the on-screen instructions to input the string, and the program will output the maximum substring value.

javac Main.java
java Main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages