Skip to content

Instantly share code, notes, and snippets.

View jamesgeorge007's full-sized avatar

James George jamesgeorge007

View GitHub Profile
@jamesgeorge007
jamesgeorge007 / collection.json
Last active November 17, 2023 11:08
Test data
[
{
"id": "clna65a120004qr0iswm647p8",
"v": 1,
"name": "Pokemon API",
"folders": [],
"requests": [
{
"id": "clna65a3e000hqr0i0kltosc2",
"v": "1",
@jamesgeorge007
jamesgeorge007 / dollarFormat.js
Created August 10, 2019 08:20
Format numbers (USD)
const [, , input] = process.argv;
const arr = input.split('.');
const sec = arr.length > 1 ? '.' + arr[1] : '';
const subArr = arr[0].split('');
let res = subArr;
if (subArr.length === 4) {
res.splice(1, 0, ',');
} else {
res.splice(3, 0, ',');
@jamesgeorge007
jamesgeorge007 / bst_operations.c
Last active November 20, 2018 16:45
Binary Search Tree operations in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
struct Node* prev;
};
@jamesgeorge007
jamesgeorge007 / bubblesort.c
Created November 17, 2018 15:12
Various sorting techniques available in C
#include<stdio.h>
int main()
{
int arr[25], n, i, j, temp;
printf("\n Number of elements: ");
scanf("%d", &n);
printf("\nEnter the elements: ");
for(i = 0;i < n; i++)
scanf("%d", &arr[i]);
@jamesgeorge007
jamesgeorge007 / doublyLinkedListOperations.c
Created November 12, 2018 18:25
Doubly Linked-list operations implemeted in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* left;
struct Node* right;
};
@jamesgeorge007
jamesgeorge007 / index.html
Created November 1, 2018 16:21
Typed-Animation using vanilla-JS demonstrating DOM manipulation.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<title>Typed Anim</title>
</head>
<body>
<script src="main.js"></script>
</body>
@jamesgeorge007
jamesgeorge007 / polynomialAdditionLL.c
Last active September 25, 2023 01:59
Polynomial Addition using Linked list.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int coeff;
int pow;
struct Node* next;
};
@jamesgeorge007
jamesgeorge007 / queueImplementation.c
Created October 20, 2018 05:21
Queue implemented using Linked list in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
};
int count = 0;
@jamesgeorge007
jamesgeorge007 / stackImplementation.c
Created October 19, 2018 17:02
Stack implementation using linked list in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
};
struct Node* top = NULL;
@jamesgeorge007
jamesgeorge007 / polynomialAddition.c
Created October 19, 2018 17:01
Polynomial Addition using array of structures in C.
struct Polynomial
{
int coeff;
int exp;
};
struct Polynomial first[15], second[15], result[15];
void display(struct Polynomial poly[], int terms)
{