Skip to content

Instantly share code, notes, and snippets.

@in1yan
in1yan / keerthi.c
Created March 30, 2025 16:33
delete by exponent
# include <stdio.h>
# include <stdlib.h>
typedef struct Node{
int coeff;
int exp;
struct Node *next;
} node;
void append(node **head, int coeff, int exp){
# include <stdio.h>
# include <stdlib.h>
struct node {
char ch;
struct node *next;
};
void append(struct node **head, char ch);
void insert(struct node **head, int pos, char ch);
# include <stdio.h>
# include <stdlib.h>
typedef struct Node{
int coeff;
int exp;
struct Node *next;
} node;
void append(node **head, int coeff, int exp){
@in1yan
in1yan / bridgesuffle.py
Created March 24, 2025 15:05
slothbytes
def bridge_shuffle(a1, a2):
shuffle = []
i,j = 0,0
while i<len(a1) and j<len(a2):
shuffle.append(a1[i])
shuffle.append(a2[i])
i += 1
j += 1
while i<len(a1):
@in1yan
in1yan / rani.c
Last active April 4, 2025 15:36
polyomial multiplication
#include <stdio.h>
#include <stdlib.h>
typedef struct Node {
int coeff;
int exp;
struct Node *next;
} node;
@in1yan
in1yan / emily.c
Last active April 12, 2025 16:18
menu driven list management
# include <stdio.h>
# include <stdlib.h>
# include <stdbool.h>
typedef struct Node{
int data;
struct Node *next;
} node;
node* create_node(int data){
node *new_node = (node *)malloc(sizeof(node));
package main
import (
"fmt"
)
var hash = map[rune]string{
'1':"I",
'2':"Z",
'3':"E",
# include <stdio.h>
# include <stdlib.h>
struct node {
int coeff;
int exp;
struct node *next;
};
void insertEnd(struct node **head,int coeff, int exp);
package main
import (
"fmt"
)
func main(){
format_phone_number([]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 0})
format_phone_number([]int{5, 1, 9, 5, 5, 5, 4, 4, 6, 8})
format_phone_number([]int{3, 4, 5, 5, 0, 1, 2, 5, 2, 7})
@in1yan
in1yan / virus.go
Created February 13, 2025 04:49
sloth bytes challenge
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(remove_virus("PC Files: spotifysetup.exe, virus.exe, dog.jpg"))
fmt.Println(remove_virus("PC Files: antivirus.exe, cat.pdf, lethalmalware.exe, dangerousvirus.exe "))