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
/** | |
* Please use any online IDE or browser's console to see the output | |
* Link to online IDE: https://repl.it/languages/nodejs | |
* | |
*/ | |
const chicken = () => egg(); | |
const egg = () => chicken(); | |
console.log(`${chicken()} came first`); | |
// ...and the debate continues! |
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
#!/usr/bin/env python | |
import socket | |
import subprocess | |
import sys | |
from datetime import datetime | |
# Clear the screen | |
subprocess.call('clear', shell=True) | |
# Ask for input |
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
image: node:6.9.4 | |
pipelines: | |
branches: | |
master: | |
- step: | |
script: | |
- apt-get update; apt-get install -y gettext-base; | |
- echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list | |
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
- set -x && apt-get update && apt-get install -y xvfb google-chrome-stable |
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
/* | |
@author vinitshahdeo | |
*/ | |
<?php | |
$data = base64_decode('SGFwcHkgQmlydGhkYXkh'); | |
echo $data; | |
?> |
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
/* | |
@author vinitshahdeo | |
*/ | |
#include <stdio.h> | |
char *secret = "ziBbeqjAs+cu"; | |
unsigned long message = 10521325414783145265U; | |
int main(void) { | |
while (message) { | |
putchar(secret[message & 15] - 33); | |
message >>= 4; |
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
/* | |
@author vinitshahdeo | |
*/ | |
#include<stdio.h> | |
main(){ | |
char str[]="Ibqqz!Cjsuiebz",*p; | |
p=str; | |
while(*p!='\0') | |
--*p++; | |
printf("%s",str); |
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
/* | |
Author - Vinit Shahdeo | |
Copyright - CodeChef VIT Chapter | |
*/ | |
#include<bits/stdc++.h> | |
using namespace std; | |
bool check(int n) | |
{ | |
int prev=0; | |
while(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
class Solution { | |
public: | |
vector<int> twoSum(vector<int>& nums, int target) { | |
map<int,int> m; | |
vector<int> v; | |
for(int i=0;i<nums.size();i++) | |
{ | |
if(m.find(target-nums[i])!=m.end()) | |
{ | |
v.push_back(m[target-nums[i]]); |
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
class Solution { | |
public: | |
vector<vector<int>> threeSum(vector<int>& nums) { | |
set<vector<int> > st; | |
sort(num.begin(), num.end()); | |
int i, j, k; | |
int n = num.size(); | |
for (i = 0; i < n - 2; i++) { | |
j = i+1; | |
k = n-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
/* | |
Author - Vinit Shahdeo | |
*/ | |
#include<bits/stdc++.h> | |
using namespace std; | |
void printNGE(int a[],int n) | |
{ | |
stack<int> s; | |
map<int,int> m; | |
for(int i=0;i<n;i++) |