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
{ | |
find(type: Account, arcql: "*") { | |
edges { | |
node { | |
... on Account { | |
username | |
password { | |
value | |
} | |
emails { |
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
class Solution { | |
public int rob(int[] nums) { | |
if(nums.length==0) return 0; | |
if(nums.length==1) return nums[0]; | |
int[] dp = new int[nums.length]; | |
dp[0] = nums[0]; | |
dp[1] = Math.max(nums[0], nums[1]); | |
for(int i = 2; i < nums.length; i++) { | |
dp[i] = Math.max(dp[i-1], nums[i]+dp[i-2]); | |
} |
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
class Solution { | |
int[][] mem; | |
int dp(List<List<Integer>> arr, int level, int idx) { | |
if(level<0) return 0; | |
if(mem[level][idx]!=-999999) { | |
return mem[level][idx]; | |
} | |
int ret = Integer.MAX_VALUE; | |
if (idx == arr.get(level).size()) { |
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
class Solution { | |
public int[][] updateMatrix(int[][] mat) { | |
int m = mat.length; | |
int n = mat[0].length; | |
int[][] out = new int[m][n]; | |
for(int i = 0; i < m; i++) { | |
for(int j = 0; j < n; j++) { | |
if(mat[i][j] == 0) { | |
out[i][j] = 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
mstafa@mstafa-Inspiron-3537:~$ wsk action -i invoke /whisk.system/listVenues -p longitude -122.406417 -p latitude 37.785834 -p types night_club --result | |
{ | |
"error": "The action did not produce a valid JSON response: [{\"name\":\"San Francisco\",\"photos\":[{\"height\":2268,\"html_attributions\":[\"<a href=\\\"https://maps.google.com/maps/contrib/111865529051261229115\\\">Aylof</a>\"],\"photo_reference\":\"Aap_uEDFTBhdW6kYQxrbBVpHijgvNtMmQVGK8qqx59xr89KmzVQN5A2Vb65pug75zWZP8UVmWJ27bWw2w5O-GrjVIVu4ft35yoikrt4QGySdv9c-LIzHwBjutUFHqFmhKKe6TfOCS5kvDgwbdfdQEqTz8WpnRhCV1lDGrpDJ1duvID3L19Jv\",\"width\":4032}],\"placeID\":\"ChIJIQBpAG2ahYAR_6128GcTUEo\",\"location\":{\"lat\":37.7749295,\"lng\":-122.4194155}},{\"name\":\"The Clift Royal Sonesta Hotel\",\"photos\":[{\"height\":3456,\"html_attributions\":[\"<a href=\\\"https://maps.google.com/maps/contrib/114649630923866463683\\\">Zachary Green</a>\"],\"photo_reference\":\"Aap_uEBBvL6lk0fvDk-vMSHI9RieW1n1bBlQ8hwIInaCu7id9Z_aYMnm7RVTFupld-y99UeXDdAG_9mTpJcfCUB0JU7l-XbS |
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
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Deque; | |
import java.util.List; | |
import java.util.Stack; | |
class Traverse { | |
int[][] graph; | |
boolean[] visited; |
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
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Deque; | |
import java.util.List; | |
import java.util.Stack; | |
class Traverse { | |
int[][] graph; | |
boolean[] visited; | |
List<List<Integer>> retPaths; |
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
{ | |
"took": 109, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"skipped": 0, | |
"failed": 0 | |
}, | |
"hits": { |
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
{ | |
"took": 3, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"skipped": 0, | |
"failed": 0 | |
}, | |
"hits": { |
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
{ | |
"took": 32, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"skipped": 0, | |
"failed": 0 | |
}, | |
"hits": { |