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
-- Set <space> as the leader key | |
-- See `:help mapleader` | |
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) | |
vim.cmd("imap jj <Esc>") | |
vim.g.mapleader = ',' | |
vim.g.maplocalleader = ',' | |
-- --------Opening Closing-------------------- | |
vim.cmd("inoremap { {}<Esc>ha") | |
vim.cmd("inoremap ( ()<Esc>ha") |
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
/** | |
WAP that takes 2 sorted (in non-increasing order) integer arrays as input, then merges the two arrays into one array sorted in non-increasing order in O(n+m). | |
Sample input Sample output | |
4 | |
5 3 2 1 | |
5 | |
7 6 3 2 1 7 6 5 3 3 2 2 1 1 | |
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
/* | |
You are given an integer n or –n .If you are given n , print n to –n , if you are given –n, print –n to n. | |
See the sample output for more clarification. | |
Sample Input : Sample Output : | |
5 5 4 3 2 1 0 -1 -2 -3 -4 -5 | |
-4 -4 -3 -2 -1 0 1 2 3 4 | |
*/ | |
#include <stdio.h> |
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
int main() { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT */ | |
int N, R, K, i, j, index, boysIndex; | |
int arr[21]; | |
int arr2[21]; | |
int arr3[21]; | |
int mergeArray[21]; | |
scanf("%d", &N); |
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
/* | |
* Write a C program to take one positive integer N, the size of an array as input. | |
* Then take an integer array of size N as input. | |
* You need to print the values and for every value, you need print other values than that. | |
* See the samples for more clarification. | |
*/ | |
#include <stdio.h> | |
int main() { |
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> | |
int main() { | |
// Write C code here | |
int i, n, m, unique = 0; | |
int value; | |
printf("Size of array: "); | |
scanf("%d", &n); | |
int arr[n]; |
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
/* | |
* You will be given an positive integer N and after that an integer array of size N. | |
* Then you will be given Q which refers to queries. For each query you will be given i and v where i refers to the index and v to value. | |
* You need to add the value to that index. After all of the queries print the values | |
*/ | |
#include <stdio.h> | |
int main() { | |
// Write C code here |
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
/* | |
*Write a C program to take one positive integer N, the size of an array as input. | |
*Then take an integer array of size N as input and show output in reverse order. | |
*/ | |
#include <stdio.h> | |
int main() { | |
int i, N; | |
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
// Write a c program to sort a array element in Desending order | |
#include <stdio.h> | |
int main() { | |
int i, j, temp, n1, n2, n3; | |
int arr1[100000], arr2[100000], arr3[200000]; | |
printf("Please enter the size of first array: "); | |
scanf("%d", &n1); |
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
//problem 01 | |
#include <stdio.h> | |
int main() | |
{ | |
int a = 5, b = 13; | |
// Write code here | |
int temp; | |
temp = a; | |
a = b; |
NewerOlder