Implement the Dynamic Programming-Rod Cutting in Java

Posted By: Achchuthan Yogarajah - 7:57 PM
Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, then the maximum obtainable value is 22 (by cutting in two pieces of lengths 2 and 6)

Bloom filter to test whether a given word is in a set or not in Java using MD5 hashing

Posted By: Achchuthan Yogarajah - 7:26 PM
There are many circumstances where we need to find out if something is a member of a set, and there are many algorithms for doing it. For example a spell checker checks to see whether a given word is in the dictionary. Holding 250,000 words in memory for a spell checker might be too big an overhead if your target environment has low memory.

Find the MD5 hash value of a string in java

Posted By: Achchuthan Yogarajah - 6:59 PM
Here is the example is show quick way to calculate the MD5 hash of a string. I know things with Java have to be well structured and since MD5 is a hashing algorithm it is fairly logical to be in the security package. On the other hand i think a quick md5 method should be in the String class but that’s just my humble oppinion. Anyways here is how it’s done the Java way.

Copyright © 2016 Java Examples ACHCHUTHAN.ORG. Designed by Templateism .