public static char[] replaceSpace(char[] str, int length){
		 int countSpace=0;
		 for(int i=0;i<length;i++){
			 if (str[i]==' ') 
				 countSpace++;
	     }
		 /*Replace the char from backwards so that the operation does not require extra space*/
		 /*int finalLength = length + countSpace*2; */
		 
		 for(int i=length;i>=0&&countSpace>0;i--){
			 str[i+countSpace *2]=str[i];
			 if(str[i]==' '){
				 str[i+countSpace*2]='0';
				 str[i+countSpace*2-1]='2';
				 str[i+countSpace*2-2]='%';
				 countSpace--;		 
			 } 
		 }
		 
		 return str;
	 }