JAVA || EASY SOLUTION || O(1) TC
\nclass Solution {\n    void helper(int data[],int min,int sec){\n        data[1]=min%10;\n        data[0]=(min/10)%10;\n        data[3]=sec%10;\n        data[2
```\nclass Solution {\n    void helper(int data[],int min,int sec){\n        data[1]=min%10;\n        data[0]=(min/10)%10;\n        data[3]=sec%10;\n        data[2]=(sec/10)%10;\n    }\n   \n    int getCost(int current,int mcost,int pcost,int data[]){\n        int p=0,cost=0;\n        while(p<4&&data[p]==0)p++;\n        while(p<4){\n        if(data[p]==current){\n            cost+=pcost;\n        }\n        else{\n            cost+=(pcost+mcost);\n            current=data[p];\n        }\n            p++;\n            \n    }\n        return cost;\n    }\n \n    public int minCostSetTime(int startAt, int moveCost, int pushCost, int seconds) {\n        int min=seconds/60;\n        int sec=seconds%60;\n        int res=Integer.MAX_VALUE;\n        int data[]=new int[4];\n        if(min>=1&&sec<=39){\n            \nhelper(data,min-1,sec+60);\n            res=getCost(startAt,moveCost,pushCost,data);\n        }\n        helper(data,min,sec);\n        if(min<=99)\n        res=Math.min(res,getCost(startAt,moveCost,pushCost,data));\n        return res;       \n    }\n}\n```
[]