Java examples for Collection Framework:Array Algorithm
is Subset between two int array
//package com.java2s; public class Main { public static boolean isSubset(int[] a, int[] b) { if (a.length != b.length) throw new IllegalArgumentException( "Compared arrays must be the same length."); for (int i = 0; i < a.length; i++) { if (a[i] < b[i]) return false; }/*from www .j av a 2 s .com*/ return true; } }