top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Please help me to write LRU cache using Treemap in Java?

+2 votes
Please help me to write LRU cache using Treemap in Java?
posted May 26, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+3 votes

How can we implement an LRU cache using just a single container i.e. map or unordered_map?

Expected operations:
1. find(key_t) - find a certain value in cache
2. insert(key_t, value_t) - insert a new value to the cache

–2 votes

Write java program that deal with different shapes. Shapes mean geometry shapes i.e. circle, rectangle, square, and triangle.

Circle: radius
Rectangle: height and width
Square: height
Triangle: base and height

All shapes have area but each shape has specific way for calculating the area:

Circle: ½ pie square *radius
Rectangle: height * width
Square: height * height
Triangle: ½ base *height

Finally, in the main program
1. Define all different kinds of shapes
2. Call Area method for all objects and print result .

+9 votes

how we can build LRU cache in java using concurrent package??
Can anyone give some code.