saddleback-search-algorithm using divide a conquer //https://www.geeksforgeeks.org/saddleback-search-algorithm-in-a-2d-array/ class search { static Saddleback ( arry : Array < any >, row : number , col : number , value : any ) { let bottomRowIndex : number =( row - 1 ); let bottomLeftCol : number = 0 ; while ( bottomRowIndex >= 0 && bottomLeftCol < col ) { if ( arry [ bottomRowIndex ][ bottomLeftCol ]=== value ) { return { rowindex : bottomRowIndex , colIndex : bottomLeftCol }; } else { if ( arry [ bottomRowIndex ][ bottomLeftCol ]> value ) { bottomRowIndex -= 1 ; } else { bottomLeftCol += 1 ; } } } } } let values =[[ 10 , 20 , 30 , 40 ], ...
all about coding especially in javascript, daily used algorithms, react, angular and other gaming stuffs like webgl, pixijs, three.js and cocos2dx running code sample especially in javascript and c++.