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
/* C/C++ Implementation of Memory | |
efficient Doubly Linked List */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <inttypes.h> | |
// Node structure of a memory | |
// efficient doubly linked list | |
struct Node | |
{ |
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
// Credits : Ashmik Harinkhede | |
#include<iostream> | |
#include<vector> | |
using namespace std; | |
void swap(vector<int> &arr, int i, int j){ | |
int temp = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = temp; | |
} |
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
//CODE TO Count_Number_Of_Strings_With_Given_Prefix | |
//Assumption: All characters are in lowercase | |
#include<iostream> | |
using namespace std; | |
//#define NULL 0 | |
struct Trienode | |
{ | |
char data; | |
int wc; //wc:word_count |
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.7.0 <0.9.0; | |
contract Storage { | |
uint totalContractBalance = 0; | |
mapping(address => uint) public balance; | |
bool public isActive = false; | |
uint constant public threshold = 0.003 * 10**18; | |
uint public deadline = block.timestamp + 1 minutes; | |
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
import { BigNumberish, ethers } from 'ethers' | |
import { KernelFactory__factory, EntryPoint__factory } from '@zerodevapp/contracts-new' | |
const ENTRYPOINT_ADDRESS = '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789' | |
const KERNEL_FACTORY_ADDRESS = '0x4E4946298614FC299B50c947289F4aD0572CB9ce' | |
async function getKernelWalletAddress(factoryAddress: string, entryPointAddress: string, provider: ethers.providers.BaseProvider, signerWalletAddress: string, index: BigNumberish): Promise<string> { | |
const factory = KernelFactory__factory.connect( | |
factoryAddress, | |
provider |