public Interval merge(Interval i1,Interval i2){

		Interval res = new Interval();
		/**
		 * 				st1  ed1
		 * st2  ed2
		 * 							st2  ed2
		 *
		 */
		if( ( i2.end <i1.start )|| (i1.end<i2.start) ){
			return null;
		}
		/**
		 * 			st1  	ed1
		 * 		st2  	ed2
		 * 		st2				ed2
		 */
		else if( i2.start <= i1.start ){
			res.start = i2.start;
			res.end = max(i1.end,i2.end);
		}
		/**
		 * 	st1 	ed1
		 * 		st2		ed2
		 */
		else if( i2.start>i1.start){
			res.start = i1.start;
			res.end = max(i1.end,i2.end);
		}
		if(log) {
			System.out.println("I1 " + i1 + ",I2 " + i2+"="+res);

		}
		return res;
	}