function sharedStart(A){
            if(A.length == 1){return A[0]}
            if(A.length > 1 ){
                var tem1, tem2, s, A = A.slice(0).sort();
                tem1 = A[0];
                s = tem1.length;
                tem2 = A.pop();
                while(s && tem2.indexOf(tem1) == -1){
                    tem1 = tem1.substring(0, --s);
                }
                return tem1;
            }
            return "";
        }
// give common prefix of a array of string
give common prefix of a array of string
give common prefix of a array of string
function sharedStart(A){
            if(A.length == 1){return A[0]}
            if(A.length > 1 ){
                var tem1, tem2, s, A = A.slice(0).sort();
                tem1 = A[0];
                s = tem1.length;
                tem2 = A.pop();
                while(s && tem2.indexOf(tem1) == -1){
                    tem1 = tem1.substring(0, --s);
                }
                return tem1;
            }
            return "";
        }
function sharedStart ( A ) { if ( A . length == 1 ) { return A [ 0 ] } if ( A . length > 1 ) { var tem1 , tem2 , s , A = A . slice ( 0 ) . sort ( ) ; tem1 = A [ 0 ] ; s = tem1 . length ; tem2 = A . pop ( ) ; while ( s && tem2 . indexOf ( tem1 ) == - 1 ) { tem1 = tem1 . substring ( 0 , -- s ) ; } return tem1 ; } return "" ; }
give common prefix of a array of string
give common prefix of a array of string