Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Vinay Puranik vinaypuranik

💭
I may be slow to respond.
View GitHub Profile
View gist:3762f0a1fcdfab7ded18ed6f6681b1a9
package ee.energia.ocppapi.model.entity;
import lombok.Data;
import javax.persistence.*;
import java.time.LocalDateTime;
@Data
@Entity
@Table(name = "\"ocpp-message-V_16-SetChargingProfile-conf\"")
@IdClass(SetChargingProfileConfPK.class)
View SetChargingProfileReq
package ee.energia.ocppapi.model.entity;
import ee.energia.ocppapi.model.ChargingProfileKind;
import ee.energia.ocppapi.model.ChargingProfilePurpose;
import ee.energia.ocppapi.model.ChargingRateUnitType;
import ee.energia.ocppapi.model.RecurrencyKindType;
import lombok.Data;
import javax.persistence.*;
import java.math.BigDecimal;
@vinaypuranik
vinaypuranik / MaxWidth.java
Last active May 8, 2020
MaxWidth of a vertical path
View MaxWidth.java
import java.util.*;
/*
Time complexity O(N*logN) where n is the number of x points.
Space O(1)
*/
public class MaxWidth{
public static int maxWidth(int[] X, int[] Y) {
Arrays.sort(X);
@vinaypuranik
vinaypuranik / CheckWriter.java
Last active Aug 8, 2019
Checkwriter for Number to Euros representation.
View CheckWriter.java
public class CheckWriter {
public static String BASIC_MONEYTARY_UNIT = " Euros";
public static String MONEYTARY_UNIT = " cents";
public static int MILLIONS = 1000000;
public static int THOUSANDS = 1000;
public static void main(String[] args) {
@vinaypuranik
vinaypuranik / gist:4b7867856ea75c1deede4630f770899d
Created Aug 8, 2019
Checkwriter for Number to Euros represenatation.
View gist:4b7867856ea75c1deede4630f770899d
public class CheckWriter {
public static String BASIC_MONEYTARY_UNIT = " Euros";
public static String MONEYTARY_UNIT = " cents";
public static int MILLIONS = 1000000;
public static int THOUSANDS = 1000;
public static void main(String[] args) {
View gist:0786a61d4c3beb1e3407388723fbc02f
import java.util.*;
class Solution{
public int solution(String S) {
List<String> sentences = new ArrayList<String>();
List<Integer[]> dot = getLocations(S, ".");
List<Integer[]> question = getLocations(S, "?");
List<Integer[]> exclaimation = getLocations(S, "!");