algorithms/src/arrays/FlattenArrayImpl.java
/**
	 * Flattens nested array to the int array
	 * @param objs
	 * @return
	 */
Flattens nested array to the int array
@param objs
@return
Flattens nested array to the int array @param objs @return
public int[] flatten(Object[] objs) {
		if(objs == null) {
			return null;
		}
		if(objs.length == 0) {
			return new int[] {};
		}
		List<Integer> flattenList = new ArrayList<>();
		flatten(objs, flattenList);
		return flattenList.stream().mapToInt(i->i).toArray();
	}
public int [ ] flatten ( Object [ ] objs ) { if ( objs == null ) { return null ; } if ( objs . length == 0 ) { return new int [ ] { } ; } List < Integer > flattenList = new ArrayList < > ( ) ; flatten ( objs , flattenList ) ; return flattenList . stream ( ) . mapToInt ( i -> i ) . toArray ( ) ; }
Flattens nested array to the int array
 @param objs
 @return
Flattens nested array to the int array @param objs @return
//if objs is null return null //objs are empty so returning empty int array //flattenList contains the flattened result of objs //convert list to int array