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
maprcli cluster feature list -name mfs.feature.db.json.support | |
maprcli dashboard info | |
maprcli userconfig load | |
maprcli config load | |
maprcli license list | |
maprcli license apps | |
maprcli alarm view | |
maprcli alarm group listGroup | |
maprcli rlimit get -resource disk | |
maprcli acl userperms -type cluster -user root |
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
//RECURSIVE | |
public TreeNode sortedArrayToBSTRecursive(int[] nums) { | |
if(nums == null)return null; | |
TreeNode root = sortedArrayToBSTHelper(nums,0,nums.length-1); | |
return root; | |
} | |
public TreeNode sortedArrayToBSTHelper(int[] nums, int begin, int end) { |
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
/** | |
* Definition for singly-linked list. | |
* public class ListNode { | |
* int val; | |
* ListNode next; | |
* ListNode(int x) { val = x; } | |
* } | |
*/ | |
class OddEvenLinkedList { | |
public ListNode oddEvenList(ListNode head) { |
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
package com.learning.leet.problems; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Created by sargonbenjamin on 7/17/19. | |
* https://leetcode.com/problems/lru-cache/ | |
*/ | |
public class LRUCache { |
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
package com.learning.leet.tree; | |
/** | |
* Created by sargonbenjamin on 7/17/19. | |
* https://leetcode.com/problems/closest-binary-search-tree-value/ | |
*/ | |
public class ClosestBSTValue { | |
TreeNode minNode = null; | |
double minDelta = Double.MAX_VALUE; |
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
package com.learning.leet.math; | |
/** | |
* Created by sargonbenjamin on 7/15/19. | |
* https://leetcode.com/explore/interview/card/top-interview-questions-easy/102/math/744/ | |
*/ | |
public class CountPrimes { | |
public int countPrimes(int n) { | |
if(n<=1)return 0; |
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
package com.learning.leet.tree; | |
/** | |
* Created by sargonbenjamin on 7/10/19. | |
* https://leetcode.com/problems/count-complete-tree-nodes/ | |
*/ | |
public class CountCompleteTreeNodez { | |
public int countNodes(TreeNode root) { | |
if(root==null)return 0; | |
int leftMost = nodeDepthLeft(root); |
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
package com.learning.leet.strsarrs; | |
/** | |
* Created by sargonbenjamin on 7/10/19. | |
* https://leetcode.com/problems/maximum-subarray/ | |
*/ | |
public class MaximumSubarray { | |
public static void main(String args[]){ |
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
public int mincostTickets(int[] days, int[] costs) { | |
Set<Integer> setRideDays = new HashSet<>(); | |
for(int day : days){ | |
setRideDays.add(day); | |
} | |
int[] minCostCache = new int[366]; | |
for(int i = 0; i<minCostCache.length;i++){ | |
minCostCache[i]=-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
package com.learning.leet.problems; | |
import java.util.HashSet; | |
import java.util.Set; | |
/** | |
* Created by sargonbenjamin on 7/9/19. | |
* https://leetcode.com/problems/minimum-cost-for-tickets/ | |
*/ | |
public class MinCostForTickets { |
NewerOlder