Skip to content

Instantly share code, notes, and snippets.

View garvitlnmiit's full-sized avatar

Garvit Sharma garvitlnmiit

  • Paytm
  • Bangalore
View GitHub Profile
@garvitlnmiit
garvitlnmiit / Process.java
Last active June 2, 2018 14:46
Flink Process Element
DataStream stream = ...; // Kafka stream consumer08 (version)
stream.keyBy("personId");
stream.process(new ProcessAlerts());
/**
* The data type stored in the state
*/
public class PersonDetail {
public int personId;
@garvitlnmiit
garvitlnmiit / ZCO15001.cpp
Created June 18, 2017 07:42
Codechef ZCO15001 solution
#include <bits/stdc++.h>
using namespace std;
bool ispalindrome(int W[], int low, int high)
{
if (low == high)
return 1;
int mid = (high - low) / 2;
for (int i = 0; i <= mid; i++)
{
@garvitlnmiit
garvitlnmiit / ZCO14003.cpp
Last active June 18, 2017 04:47
Codechef ZCO14003 Solution
// Garvit Sharma <garvits45@gmail.com> <garvitlnmiit> <garvitsharma.in>
// Codechef ZCO, problem 1
#include <bits/stdc++.h>
using namespace std;
const int MAX_SIZE = 500000;
typedef long long ll;
ll data[MAX_SIZE];