Skip to content

Instantly share code, notes, and snippets.

View dpkdns's full-sized avatar
🎯
One Thing At A Time

Deepak Tripathi dpkdns

🎯
One Thing At A Time
View GitHub Profile
@dpkdns
dpkdns / all-shopping-apps-privacy-policy
Last active March 9, 2025 17:55
all Shopping Apps Privacy Policy
# Privacy Policy for All Shopping Apps
**Last Updated:** March 9, 2025
This Privacy Policy explains how **All Shopping Apps** ("we," "us," or "our") collects, uses, shares, and protects your personal information when you use our mobile app, website, or services. By using **All Shopping Apps**, you agree to the terms outlined below.
---
## 1. Information We Collect
We collect the following types of information to provide and improve our services:
@dpkdns
dpkdns / arti_sangrah_privacy.md
Created September 4, 2022 21:22
Arti Sangrah Privacy Policy

We do not collect any user data nor do we capture your device details. All activites on the platform are anonymous

@dpkdns
dpkdns / Denominations.java
Created April 16, 2019 15:53
Denominations Grofers Hackerrank
import java.io.*;
import java.util.*;
public class Denominations {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter wr = new PrintWriter(System.out);
int T = Integer.parseInt(br.readLine().trim());
for (int t_i = 0; t_i < T; t_i++) {
@dpkdns
dpkdns / BuildBridges.java
Created April 14, 2019 21:36
Connect all islands - Amazon Coding
// IMPORT LIBRARY PACKAGES NEEDED BY YOUR PROGRAM
// SOME CLASSES WITHIN A PACKAGE MAY BE RESTRICTED
// DEFINE ANY CLASS AND METHOD NEEDED
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
// CLASS BEGINS, THIS CLASS IS REQUIRED
public class BuildBridges {
static int[] id = null;
@dpkdns
dpkdns / TruckAndLoad.java
Last active March 5, 2022 07:23
Truck and Load - Amazon Coding
import java.util.*;
public class TruckAndLoad
{
ArrayList<Integer> IDsOfPackages(int truckSpace,
ArrayList<Integer> packagesSpace)
{
Map<Integer, Integer> map = new HashMap<>();
int max = Integer.MIN_VALUE;
truckSpace -= 30;
ArrayList<Integer> list = new ArrayList<>();
@dpkdns
dpkdns / PaperBoyProblem.java
Created January 7, 2019 22:02
Paper Boy Problem - Hamiltonian Graph
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class PaperBoyProblem {
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine().trim());
for (int i_t = 0; i_t < t; ++i_t) {
String[] temp = br.readLine().split(" ");
@dpkdns
dpkdns / AtoI.java
Created December 5, 2018 21:30
Converts String to Integer
public class AtoI {
public int myAtoi(String str) {
int t = 0;
int i = 0;
while(true) {
while(i < str.length() && str.charAt(i) == ' ') i++;
int sign = 1;
if(i < str.length() && str.charAt(i) == '-') {
sign = -1;
i++;
@dpkdns
dpkdns / MaximumDifference.java
Last active November 25, 2018 19:23
Maximum Difference in an Array
class MaximumDifference {
static int maxDifference(int[] a) {
if(a == null || a.length < 2) {
return -1;
}
int currentMin = a[0];
int maxDiff = -1;
for(int i = 1; i < a.length; i++) {
if(a[i] < currentMin) {
import java.io.*;
public class CountingValleys {
// Complete the countingValleys function below.
static int countingValleys(int n, String s) {
int currentDepth = 0;
int valleys = 0;
for(int i = 0; i < n; i++){
int step = s.charAt(i) == 'D' ? -1:1;
currentDepth += step;
if(currentDepth == -1 && s.charAt(i) == 'D') {
import java.io.*;
public class CountingValleys {
// Complete the countingValleys function below.
static int countingValleys(int n, String s) {
int currentDepth = 0;
int valleys = 0;
for(int i = 0; i < n; i++){
int step = s.charAt(i) == 'D' ? -1:1;
currentDepth += step;
if(currentDepth == -1 && s.charAt(i) == 'D') {