Back to Type Challenges

README

questions/34007-medium-compare-array-length/README.md

latest1.3 KB
Original Source
<!--info-header-start--><h1>Compare Array Length </h1><blockquote><p>by alviner <a href="https://github.com/ScriptBloom" target="_blank">@ScriptBloom</a></p></blockquote><p><a href="https://tsch.js.org/34007/play" target="_blank"></a> </p><!--info-header-end-->

Implement CompareArrayLength to compare two array length(T & U).

If length of T array is greater than U, return 1; If length of U array is greater than T, return -1; If length of T array is equal to U, return 0.

<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/34007/answer" target="_blank"></a> <a href="https://tsch.js.org/34007/solutions" target="_blank"></a> <!--info-footer-end-->