Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to find the period that most number of calls made where made from a file

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a java project with the following: I have an input file that holds calls range in milliseconds all over the year – the file is sorted by start time. for example 0-100 (call started at 0 ended at 100) 1-100 , 5-50 , 60-150, 65-180 I need to return the period in the year when the network was the busiest. in this example the result will be 65-100 because in this period there were 4 calls in the air I have limited heap memory ( 8GB ) and must run over the file only once what is the best logic to use here ( in java)
 
Saloon Keeper
Posts: 12157
258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You posted this question in the HTML/CSS/JavaScript forum. Do you intend to process the files with JavaScript?

It would help if you had an example of an entry.
 
Sheriff
Posts: 15811
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samantha, a question like "What is the best logic to use here?" is not likely to get you many answers. It's your job as the learner to figure out what kind of logic you need to use. At CodeRanch, we try to avoid doing your job for you. We will, however, give you feedback about any ideas you might have and gently suggest ways you might get on track to a better way of doing something.

On that note, what ideas do you have for solving this problem? Show us what you have tried, preferably in code.
 
Hold that thought. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic