- User/Customer
- who will use this system
- how this system will be used
import hre, { ethers } from "hardhat"; | |
import { Contract } from "ethers"; | |
describe("Forking", function () { | |
it("Should fork mainnet4", async function () { | |
const mainnetTestAccountAddress = "0x618d17fa59c67aEA20A88dc75d4E28E728a6fF28"; | |
const usdcAbi = require("@openzeppelin/contracts/build/contracts/IERC20.json").abi; | |
const usdcAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; | |
// check the block number |
public class MinPathWithOneFlip { | |
/** | |
* [x,y,flip,dist] -> we can get to i=2,j=0 in two different ways: [2,0,1,1] && [2,0,0,8] | |
* we should keep track of two different scenarios. if we have flipped and reached there or if we reached there with no flip | |
*/ | |
int[][] DIR = {{1,0}, {0,1}, {-1,0}, {0,-1}}; | |
int minPath(int[][] board) { | |
int m = board.length; |
public String sort(String s, int k) { | |
Map<Character, Integer> map = new HashMap<>(); | |
for(char c : s.toCharArray()) { | |
map.put(c, map.getOrDefault(c, 0) + 1); | |
} | |
// largest char first | |
PriorityQueue<Map.Entry<Character, Integer>> pq = new PriorityQueue<>((a,b) -> { | |
return (b.getKey() - a.getKey()); |
843 | |
43 | |
863 | |
121 | |
173 | |
124 | |
272 | |
39 | |
536 | |
426 |