This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.0; | |
contract InsertionSort{ | |
function sort(uint256[] memory data, uint256[] memory refs) internal pure returns (uint256[] memory, uint256[] memory){ | |
// Higher deployment cost but betters execution cost | |
int256 j; | |
uint256 unsignedJ; | |
uint256 unsignedJplus1; | |
uint256 key; | |
uint256 val; |