Skip to content

Instantly share code, notes, and snippets.

View rajan-31's full-sized avatar
🎯
Exploring

Rajan Khade rajan-31

🎯
Exploring
View GitHub Profile
@rajan-31
rajan-31 / optimized_bubble_sort.c
Last active January 5, 2023 08:58
Sorting Algorithms
#include <stdio.h>
void printA(int * A, int LB, int UB) {
for (int i = LB; i <= UB; i++)
printf("%d\n", A[i]);
}
void swap(int * x, int * y) {
int t = * x;
* x = * y;
@rajan-31
rajan-31 / swap_array_elts.c
Created January 3, 2023 13:41
In C programming language, 2 Ways to swap array elements using temp variable
#include <stdio.h>
void swap(int *x, int *y) {
int t = *x;
*x = *y;
*y = t;
}
int main()
{
int arr[5] = {1, 2, 3, 4, 5};
@rajan-31
rajan-31 / landRegistry.sol
Last active August 29, 2021 15:26
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.1+commit.df193b15.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 < 0.9.0;
contract landRecords {
struct Admin {
string name;
string district;
}
struct User {
string name;
string docHash;