View intList.py
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
## creaing intList. | |
## This is a method that create IntList that feature seeks as input. value can | |
# take anything that is integer iterable. | |
# for example you can pass a set {3,4,6}, list [2,5,4], tuple (6,4,2). | |
# It is all good | |
intL = tf.train.Int64List(value=[3,4,5]) | |
# Let see how it looks. | |
print(intL) |
View intro.py
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 tensorflow as tf | |
import numpy as np |
View InterviewBit :: Min Jumps Array.cpp
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
int Solution::jump(vector<int> &A) { | |
int lastIndex = A.size()-1; | |
int sz = A.size(); | |
int i = 0; | |
int checkUpTo = i+A[i]; | |
int jumpCount = 1; | |
while(i<=checkUpTo){ |
View interviewBit_Jump_Game.cpp
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
int Solution::canJump(vector<int> &A) { | |
int sz = A.size(); | |
int lastIndex = sz-1; | |
int i = 0; | |
int reachable = A[i]; | |
while(i<=reachable){ | |
View code_snip_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View InterviewBit : Substring Concatenation
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
vector<int> Solution::findSubstring(string A, const vector<string> &B) { | |
// For the result. | |
vector<int> res; | |
// Calculating the no of sub-component available. | |
int sz = B.size(); | |
//cout << "totalComp" << " " << sz << endl; | |
View InterviewBit : Sudoku
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
bool isfine(vector<vector<int>>& res,int x,int y, int no){ | |
int i,j,k; | |
for( i = 0; i < 9 ; i++ ){ | |
if(res[x][i]==no || res[i][y]==no){ | |
return false; | |
} | |
View InterviewBit:Min Stack
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
struct Node{ | |
int val; | |
struct Node * next; | |
struct Node * nextMin; | |
Node(int v){ | |
val = v; | |
next = NULL; | |
nextMin = NULL; | |
} | |
}; |
View InterviewBit : MergeSort on the Linked List
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
ListNode* merge(ListNode*A, ListNode*B){ | |
ListNode * C; | |
ListNode * temp; | |
int i = 0; | |
while(A!=NULL && B!=NULL){ | |
if(A->val > B->val){ | |
if(i==0){ |