This file contains 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
# 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){ |
This file contains 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
# 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); |
This file contains 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
# 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){ |
This file contains 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
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): |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct Node { | |
int coeff; | |
int exp; | |
struct Node *next; | |
} node; | |
This file contains 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
# 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)); |
This file contains 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
# include <stdio.h> | |
# include <stdlib.h> | |
struct node { | |
int coeff; | |
int exp; | |
struct node *next; | |
}; | |
void insertEnd(struct node **head,int coeff, int exp); |
This file contains 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
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}) |
This file contains 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
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 ")) |