diff --git a/Akuna Capital Junior Python Developer/README.md b/Akuna Capital Junior Python Developer/README.md deleted file mode 100644 index b3c6ff7..0000000 --- a/Akuna Capital Junior Python Developer/README.md +++ /dev/null @@ -1,226 +0,0 @@ -# Got these problems in HACKERRANK challenge -# If you have answers to the question please share with me by mailing to jai.s@somaiya.edu and I will update the repo. - - -- I was given 120 minutes to solve the the following questions. -- I failed at this miserably hence the solutions that I am giving did not pass all the test cases. -- I am not giving out all the solution as other solutions were completely wrong. -- The current solutions are partially correct. - - - -## MCQ 1 ----- -B-Trees are used commonly for: -Pick one of the following: - -- efficiently sorting very large files -- for checking the consistency of relational databases -- speeding up database search, delete, and insert operations ======> Correct Answer -- organizing hash tables efficiently - -## MCQ 2 ----- - -We perform following sequence of actions: - -1. Insert th following into a set: 1, 2, 9, 1, 2, 3, 1, 4, 1, 5, 7. -2. Convert the set into list and sort it in ascending order. - -Which option denotes the sorted list? - -- {1, 2, 3, 4, 5, 7, 9} ======> Correct Answer -- {9, 7, 5, 4, 3, 2, 1} -- {1, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9} -- None of the above. - -## MCQ 3 ----- - -Check the following statements that are true. -Pick the correct choices -- It is more time efficiently to iterate through a doubly linked list in reverse than a singly linked list in reverse ======> Correct Answer -- A doubly linked list is more space efficient than a singly linked list -- Deleting a node in a doubly linked list is more time efficient than deleting a node in a singly linked list -- Singly and doubly linked list are more efficient than an array - - -## MCQ 4 ----- - -What are some ways to make it easier to test a class / function / feature ? (check all that apply) - -- Ensure that all class dependencies are passed into the class constructor -- Reduce or eliminate a function's side-effects -- Make a class' dependencies abstract (i.e interfaces) instead of concrete implementations -- Split larger classes into smaller ones that each have a single responsibility - - -## MCQ 5 ----- - -What is the return value of this function? - - function f(array, length) - int i := 0 - int result := 0 - while (i < length) - tmp := array[i] - if (tmp > result) - result := tmp - end if - i := i+1 - end while - return result - end function - -- the first value in the array -- the largest value in the array ======> Correct Answer -- the median of the array -- the smallest value in the array - -## MCQ 6 Smart Mutex Use ----- - -Which of the following statements are true regarding the snippet of pseudo-code below? - - global int a = 0 - global mutex A = unlocked - - global int b = 0 - global mutex B = unlocked - - // The following function is called in parallel by many different threads. - function critical_sections() - // Critical Section (1) - A.lock() - a := a + 1 - - B.lock() - b := a + b - - B.unlock() - A.unlock() - - // Critical Section (2) - B.lock() - b := b + 1 - - A.lock() - a := a - b - - B.unlock() - A.unlock() - - // Output Results - print("A =" + a) - print("B =" + b) - end function - -Pick the correct choices: -- Critical section (1) unlocks B before A, resulting in a potential deadlock in critical section (1). -- Critical section (2) unlocks B before A, resulting in a potential deadlock in critical section (2). -- Critical section (1) and critical section (2) lock A and B in a inconsistent manner, resulting in a potential deadlock. -- The print statements at the end of the function access a shared variable in an unsafe manner. -- The code is correct when run concurrently on a single CPU, but is unsafe on a multi-core processor. - - -## MCQ 7 - Traversal Order ----- - - function f(node) - if node is null - return - end if - f(node.left) - f(node.right) - visit(node) - end function - -[image1]: ./images/Q7-TraversalOrder.JPG "Q7-TraversalOrder" -![Q7-TraversalOrder][image1] - -Pick one of the choices - -- A, B, C, D, E, F, G, H, I -- D, G, H, I, E, F, B, C, A -- A, B, D, E, G, H, C, F, I -- D, B, G, E, H, A, C, I, F -- D, G, H, E, B, I, F, C, A ======> Correct Answer - -## MCQ 8 - Following code ----- -Consider the following pseudo-code: - - function f(int i) - int x := 1 - int loop := 1 - while (loop < 10) - x := (x*x)+ 1 - loop := loop + 1 - if (loop equals i) - break - end if - end while - return x - end function - -What value returned if the function `f` is called with input `i` set to 4? -f(4) will return ______________ = 677 - - -## MCQ 9 - Twos complement representation ----- - -Assume the following binary values are all signed 8-bit values, represented in twos-complement format, with a decimal range of -128 to 127. -Enter `T` or `F` next to statement to indicate if that statement would be true or false. -Note that `==` is a test that is true when two values are equal: - - _________ 00001010 > 00000111 - _________ 11111111 > 01111111 - _________ (11111111 + 11111111) > 00000001 - 00000010 - _________ (00000100 * 00000100) == 00010000 - _________ (11111010 * 00000011) == 11101110 - _________ (00000100 / 00000100) == 11100000 - _________ (11110000 - 00000001) == 10001111 - -## MCQ 10 - Recursion - -Complete the blanks in the following question with the appropriate answer. - -Consider the following pseudo-code that finds the greatest common divisor of two integers: - - function gcd(int a, int b) - if (a equals b) - return a - end if - if (a < b) - return gcd(a, b - a) - else - return gcd(a - b, b) - end if - end function - -How many times is the function gcd entered, including the initial call, if a program calls `gcd(15, 21)`? -the gcd() function is entered _________ times. ======> Correct Answer is 6 - - -## 11. Account Validation ----- -[image2]: ./images/Q11-AccountValidation.JPG "AccountValidation" -![AccountValidation][image2] - - -## 12. Travel Distance ----- -[image3]: ./images/Q12-TravelDistance.JPG "TravelDistance" -![TravelDistance][image3] - - -## 13. Longest Trip ----- -[image4]: ./images/Q13-LongestTrip-P1.JPG "LongestTripP1" -![LongestTripP1][image4] - -[image5]: ./images/Q13-LongestTrip-P2.JPG "LongestTripP2" -![LongestTripP2][image5] \ No newline at end of file diff --git a/Akuna Capital Junior Python Developer/accountValidation.py b/Akuna Capital Junior Python Developer/accountValidation.py deleted file mode 100644 index 3927087..0000000 --- a/Akuna Capital Junior Python Developer/accountValidation.py +++ /dev/null @@ -1,16 +0,0 @@ -def process(line): - try: - num = int(line[0: 6], 16) - except: - return "INVALID" - - num = int(line[0: 6], 16) - summ = 0 - while num != 0: - summ = summ + num % 10 - num = num // 10 - - compare = (str(hex(summ))[2:]).upper() - if line[6:] == compare: - return "VALID" - return "INVALID" diff --git a/Akuna Capital Junior Python Developer/images/Q11-AccountValidation.JPG b/Akuna Capital Junior Python Developer/images/Q11-AccountValidation.JPG deleted file mode 100644 index 47a6cff..0000000 Binary files a/Akuna Capital Junior Python Developer/images/Q11-AccountValidation.JPG and /dev/null differ diff --git a/Akuna Capital Junior Python Developer/images/Q12-TravelDistance.JPG b/Akuna Capital Junior Python Developer/images/Q12-TravelDistance.JPG deleted file mode 100644 index ac4b738..0000000 Binary files a/Akuna Capital Junior Python Developer/images/Q12-TravelDistance.JPG and /dev/null differ diff --git a/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P1.JPG b/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P1.JPG deleted file mode 100644 index bef3167..0000000 Binary files a/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P1.JPG and /dev/null differ diff --git a/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P2.JPG b/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P2.JPG deleted file mode 100644 index 6f8a0a9..0000000 Binary files a/Akuna Capital Junior Python Developer/images/Q13-LongestTrip-P2.JPG and /dev/null differ diff --git a/Akuna Capital Junior Python Developer/images/Q7-TraversalOrder.JPG b/Akuna Capital Junior Python Developer/images/Q7-TraversalOrder.JPG deleted file mode 100644 index f97f5d9..0000000 Binary files a/Akuna Capital Junior Python Developer/images/Q7-TraversalOrder.JPG and /dev/null differ diff --git a/Akuna Capital Junior Python Developer/longestTrip.py b/Akuna Capital Junior Python Developer/longestTrip.py deleted file mode 100644 index e69de29..0000000 diff --git a/Akuna Capital Junior Python Developer/travelDistance.py b/Akuna Capital Junior Python Developer/travelDistance.py deleted file mode 100644 index af3c956..0000000 --- a/Akuna Capital Junior Python Developer/travelDistance.py +++ /dev/null @@ -1,28 +0,0 @@ -from math import acos, sin, cos, radians -from collections import defaultdict - -RADIUS_MILES = 3963 - - -class DestinationCalculator: - def __init__(self): - self.p1 = [] - self.p2 = [] - - def process(self, line): - line_list = line.split(":") - if line_list[0] == "LOC": - if not self.p1: - self.p1 = list(map(float, line_list[2:])) - return line_list[1] - else: - self.p2 = list(map(float, line_list[2:])) - return line_list[1] - else: - delta_phi = abs(radians(self.p1[1]) - radians(self.p2[1])) - numerator1 = sin(radians(self.p1[0])) * sin(radians(self.p2[0])) - numerator2 = cos(radians(self.p1[0])) * cos(radians(self.p2[0])) * cos(delta_phi) - numerator = acos(numerator1 + numerator2) - dist = RADIUS_MILES * numerator - line = line[5:] - return line + ":" + str(dist).split(".")[0] diff --git a/Amazon SDE - 1 - FBA Team/README.md b/Amazon SDE - 1 - FBA Team/README.md deleted file mode 100644 index 74b1cc6..0000000 --- a/Amazon SDE - 1 - FBA Team/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Amazon amcat - -## Online Assessment Overview -The assessment consists of these components: -- a coding challenge with two scenarios (up to 90 min) -- a "describe your approach" section to discuss your coding solutions (up to 15 min) -- a work style survey (up to 15 min) -- a feedback survey (5 min) - -I am not disclosing the exact questions due to NDA. -My code has passed all the test cases of Amazon amcat. -The code provided over here is not exactly the same code that I submitted because I have rewritten the code. -I assure that the solution provided is correct. -You will get questions similar to these. - - -## 1. Closest Pair of Points - -- We are given an array of n points in the plane, and the problem is to find out the top k closest pair of points in the array. - -## 2. Shortest Path - -- Given a MxN matrix where each element can either be 0 or 1. -- We need to find the shortest path between a given source cell to a destination cell. -- The path can only be created out of a cell if its value is 1. -- You will be provided with start and goal locations - - diff --git a/Amazon SDE - 1 - FBA Team/kNearestPoints.py b/Amazon SDE - 1 - FBA Team/kNearestPoints.py deleted file mode 100644 index cf60054..0000000 --- a/Amazon SDE - 1 - FBA Team/kNearestPoints.py +++ /dev/null @@ -1,27 +0,0 @@ -# Time complexity = O(n logn) -# Space complexity = O(n) - -import math - - -def compute_euclidean_distance(x1, y1, x2, y2): - return math.sqrt(((x1-x2)**2)+((y1-y2)**2)) - - -def nearest_neighbor(points, goal_point, k): - distances = [] - - for point in points: - distance = compute_euclidean_distance(point[0], point[1], goal_point[0], goal_point[1]) - distances.append([point, distance]) - else: - distances.sort(key=lambda element: element[-1]) - - closest_neighbors = [distances[i][0] for i in range(0, k)] - return closest_neighbors - - -points_array = [[6, 3], [2, 1], [5, 2], [3, 2], [9, 0]] -goal = [3, 2] -neighbors = nearest_neighbor(points_array, goal, 3) -print(neighbors) diff --git a/Amazon SDE - 1 - FBA Team/shortestPath.py b/Amazon SDE - 1 - FBA Team/shortestPath.py deleted file mode 100644 index e474b27..0000000 --- a/Amazon SDE - 1 - FBA Team/shortestPath.py +++ /dev/null @@ -1,57 +0,0 @@ -# Time complexity = O(m*n) ==> if we ignore the list concatenation operation -# You can optimize list concatenation operation by using a linked list -# Space complexity = O(m*n) -# Use BFS -# You can optimize the space complexity to O(1) if you change the values of the matrix -# A better tome efficient solution is Dijkstra's Algorithm - -from collections import deque - - -def is_valid(x, y, n, m, matrix, visited): - if (0 <= x < n) and (0 <= y < m) and (matrix[x][y] == 1) and ((x, y) not in visited): - visited.add((x, y)) - return True - return False - - -def shortest_path(matrix, start, goal): - neighbors = ((0, 1), (0, -1), (1, 0), (-1, 0)) - - visited = set([]) - visited.add((start[0], start[1])) - - queue = deque() - queue.appendleft([start[0], start[1], 0, [start]]) - - while queue: - - x, y, step, path = queue.pop() - - if [x, y] == goal: - return path - - for i in range(len(neighbors)): - new_x = x+neighbors[i][0] - new_y = y+neighbors[i][1] - if is_valid(new_x, new_y, len(matrix), len(matrix[0]), matrix, visited): - queue.appendleft((new_x, new_y, step+1, path+[[new_x, new_y]])) - - return [] - - -mat = [[1, 0, 1, 1, 1, 1, 0, 1, 1, 1], - [1, 0, 1, 0, 1, 1, 1, 0, 1, 1], - [1, 1, 1, 0, 1, 1, 0, 1, 0, 1], - [1, 0, 0, 0, 1, 0, 0, 0, 0, 1], - [1, 1, 1, 0, 1, 1, 1, 1, 1, 0], - [1, 0, 1, 1, 1, 1, 0, 1, 0, 0], - [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], - [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], - [1, 1, 0, 0, 0, 0, 1, 0, 0, 1]] - - -a = [0, 0] -b = [5, 7] -result_path = shortest_path(mat, a, b) -print(result_path) diff --git a/Amazon SDE 2019 Intern/README.md b/Amazon SDE 2019 Intern/README.md deleted file mode 100644 index 5e07d1d..0000000 --- a/Amazon SDE 2019 Intern/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Amazon amcat - -## Online Assessment Overview -The assessment consists of these components: -- a coding challenge with two scenarios (up to 90 min) - - -## 1. Find the states - -- Eight houses represented as cells, are arranged in a straight line. -- Each day every cell completed with its adjacent cells (neighbors). -- An integer value of 1 represents an active cell and a value of 0 represents inactive cell. -- If the neighbors on both the side of a cell are either active or inactive, the cell becomes inactive on the other day; otherwise cell becomes active. -- The two cells on each end have a single adjacent cell, so assume that the occupied space on the opposite side is an inactive cell. -- Even after updating cell state, consider it's previous state when updating the state of other cells. -- The state info of all cells should be updates simultaneously. - -Write an algorithm to output state of the cells after the given number of days. - -Input: -The input to the function consists of two arguments: - state: a list of integers representing the current state of cells. - days: an integer representing the number of days. - -Output: -Return a list of integers representing the state of cells after the given number of days. - -Sample Input: - - Testcase 1: - Input: - [1, 0, 1, 1, 0, 1, 0], - 3 - - Expected Return Value: - [1, 1, 0, 0, 0, 1, 1] - - Testcase 2: - Input: - [0, 0, 1, 0, 0, 1, 1], - 5 - - Expected Return Value: - [1, 0, 1, 0, 1, 0, 1] - - - -## 2. Find GCD - -- The greatest common divisor(GCD) also called highest common factor(HCF) of `N` numbers is the largest positive integer that divides all numbers without giving a remainder. -- write an algorithm to determine the GCD of `N` positive integers. - -Input: -The input to the function consists of two arguments: - num: an integer representing the number of positive integers(N). - arr: a list of positive integers. - -Output: -Return an integer representing the GCD of the given positive integers. - -Sample Input: - - Testcase 1: - Input: - 5, - [2, 3, 4, 5, 6] - - Expected Return Value: - 1 - - Testcase 2: - Input: - 5, - [2, 4, 6, 8, 10] - - Expected Return Value: - 2 - - diff --git a/Amazon SDE 2019 Intern/findGCD.py b/Amazon SDE 2019 Intern/findGCD.py deleted file mode 100644 index 816b6f3..0000000 --- a/Amazon SDE 2019 Intern/findGCD.py +++ /dev/null @@ -1,14 +0,0 @@ -def generalizedGCD(num, arr): - # WRITE YOUR CODE HERE - mini = min(arr) - - for i in range(mini, -1, -1): - for number in arr: - if (number % i) != 0: - break - else: - return i - return 1 - - -print(generalizedGCD(5, [2, 4, 6, 8, 10])) diff --git a/Amazon SDE 2019 Intern/findStates.py b/Amazon SDE 2019 Intern/findStates.py deleted file mode 100644 index 50797da..0000000 --- a/Amazon SDE 2019 Intern/findStates.py +++ /dev/null @@ -1,16 +0,0 @@ -def cellCompete(states, days): - # WRITE YOUR CODE HERE - n = len(states) - states = [0]+states+[0] - for day in range(days): - new_states = [0]+[1]*n+[0] - for idx in range(1, len(states)-1): - state = states[idx] - if states[idx-1] == states[idx+1]: - new_states[idx] = 0 - states = new_states - return new_states[1:len(states)-1] - - -print(cellCompete([1, 0, 1, 1, 0, 1, 0], 3)) -print(cellCompete([0, 0, 1, 0, 0, 1, 1], 5)) diff --git a/Borgwards Self Driving Car Engineer-2018/README.md b/Borgwards Self Driving Car Engineer-2018/README.md new file mode 100644 index 0000000..b67002b --- /dev/null +++ b/Borgwards Self Driving Car Engineer-2018/README.md @@ -0,0 +1,15 @@ +## Interview Description +---- +- At this point of time I have cleared two interview rounds of VISA, Inc. + +## Round 1 (Phone Interview) +--- +- The phone interview was 45 minutes +- I was asked question on neural networks + + +## Round 2 (Assignment) +--- + + + diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 1 - Technical Phone Interview/README.md b/Borgwards Self Driving Car Engineer-2018/Round - 1 - Technical Phone Interview/README.md new file mode 100644 index 0000000..dfab5d8 --- /dev/null +++ b/Borgwards Self Driving Car Engineer-2018/Round - 1 - Technical Phone Interview/README.md @@ -0,0 +1,35 @@ +## Technical Phone Interview +---- + +1. What is overfitting? +Ans. + - Model remembering the training data and not performing well on the test data is called overfitting. + +2. When do you know overfitting has occurred without looking at the test data? +Ans. + - We can use validation set to see if the model overfits the training data. + - If validation error graph is more then training error graph then model overfits the training data. + + +3. How to prevent over-fitting? +Ans. + - We can prevent over-fitting by regularization. + + +4. What are the types of regularization? +Ans. + - Dropouts and L2 regularization are some types of regularizations + +5. What are Dropouts? +Ans. + - The signal from some of the nodes are skipped. + - This prevents weights from exploding or having higher value. + +6. What is batch-normalization? +Ans. + - batch-normalization is a normalization of the batch data being processed + - If the data in it's raw format is normalized to get good results then same is the idea to normalize the data in the intermediary layers + +7. Why do we use batch-normalization? +Ans. + - It helps in reducing the training time and getting fast towards the global minima. \ No newline at end of file diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/README.md b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/README.md new file mode 100644 index 0000000..256859c --- /dev/null +++ b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/README.md @@ -0,0 +1,87 @@ +## Challenge Description +---- + +# Solution: +---- +https://github.com/jayshah19949596/BorgWards-Vehicle-Detection-Challenge + +### Introduction to Challenge +---- +- This coding test does not necessarily reflect or indicate what we are working on at Borgward R&D Silicon Valley.- - The test is just to provide a way for us to estimate our candidate’s coding skills +- We are not looking for the exact correct answer or solutions, we are more looking for the way how you solve this problem, the way how you code, code style, code formality, code efficiencies, and most importantly the innovative thinking & ideas that you express in your algorithms. +- Please do NOT spend more than 2 hours on this test, and try your best to finish the test with most efficient and practical code. + +### Problem +---- +- BDD100K is a large-scale diverse driving video database: http://bair.berkeley.edu/blog/2018/05/30/bdd/. There are different tasks of perception algorithms such as object detection, semantic segmentations, lane detections that can be developed and tested using this dataset. +- Let's now focus on one task called semantic segmentation. Semantic segmentation is so called "dense" prediction problem, where predictions are demanded at per pixel level. +- Segmentation algorithms usually involves deep neural network, with approaches such as "encoder-decoder" architectures, "dilated convolutional layers", "multi-scale receptive field", so on and so forth. +- We are not going to ask you to code a DNN model to perform semantic segmentation of course for an interview test. Instead, we are working some handy tools as shown below in the figure: we need some code or algorithms to draw a bounding box around "car" or "vehicle pixels", in the example figure below, we have two cars in the raw image on the left, and assuming a prefect semantic segmentation DNN can give you a semantic map as shown on the right, we want to detect the boundaries or bounding boxes for the two vehicles, white small vehicle on the left, and the red big SUV on the right. + +[image1]: ./image_rsrcs/problem.png "Problem" +![Problem][image1] + +- Of course, this tasks is getting more and more challenging when vehicles have a lot of overlap on the image and shape becomes difficult to distinguish between different vehicles, but to get started we can assume the overlap is not huge. +- You can use any programming language that you are comfortable with (c++, python preferred), and we'd prefer you code the algorithm yourself instead of calling a library such as OpenCV. +- If you need some small sample data to test the code, we have a few images here from BDD100K: https://borgward.atlassian.net/wiki/spaces/BORPub/pages/655369/Public+Available+Dataset you can download the tar ball for the small sample dataset. + +## My Solution +---- + + +### Semantic Segmentation on Kitti +---- +- I have choosen Kitti Dataset for Vehicle Detection. you can find the description of dataset [here](http://www.cvlibs.net/datasets/kitti/eval_semseg.php?benchmark=semantics2015) +- I have tried to replicate [Fully Convolution Network](https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf) +- I have used a pretrained VGG16 Model as Encoder and in Decoder I have used Transpose Convolution with Skip Connections from the encoder +- Download VGG16 from [here](http://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/vgg.zip) +- Extract the contents of the VGG in the "./data/vgg_model" folder +- This network is used for Semantic Segmentation whose architecture is below: + +[image2]: ./image_rsrcs/semantic_segmentation.png "SemanticSegmentation" +![SemanticSegmentation][image2] + + +- Training image and its corresponding Ground Truth: + +[image3]: ./image_rsrcs/kitti_data.png "KittiData" +![KittiData][image3] + + +### Semantic Segmentation Results +---- +[image4]: ./image_rsrcs/KittiInference.png "KittiInference" +![KittiInference][image4] + +[image5]: ./image_rsrcs/KittiInference2.png "KittiInference2" +![KittiInference2][image5] + + +[image6]: ./image_rsrcs/KittiInference3.png "KittiInference3" +![KittiInference3][image6] + + +### Object Detection +---- + +### Object Detection with Tensorflow API +---- +- Used TensorFlow's Pretrained SSD model fro detecting Cars +- This model is capable of performing object detecting in real time which is faster than Semantic Segmentation +- Link to TensorFlow Object Detection Api is [here](https://github.com/tensorflow/models/tree/master/research/object_detection) +- This model is used to detect cars on this data: https://borgward.atlassian.net/wiki/spaces/BORPub/pages/655369/Public+Available+Datase + + +### Results +---- +[image7]: ./image_rsrcs/carDetection1.png "carDetection1" +![carDetection1][image7] + +[image8]: ./image_rsrcs/carDetection2.png "carDetection2" +![carDetection2][image8] + + +[image9]: ./image_rsrcs/carDetection3.png "carDetection3" +![carDetection3][image9] + + diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference.png new file mode 100644 index 0000000..3c2d41f Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference2.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference2.png new file mode 100644 index 0000000..fe732fb Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference2.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference3.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference3.png new file mode 100644 index 0000000..7fd5e88 Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/KittiInference3.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection1.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection1.png new file mode 100644 index 0000000..54c4292 Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection1.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection2.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection2.png new file mode 100644 index 0000000..5e223be Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection2.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection3.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection3.png new file mode 100644 index 0000000..fa7f1e1 Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/carDetection3.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/kitti_data.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/kitti_data.png new file mode 100644 index 0000000..ce92ffa Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/kitti_data.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/problem.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/problem.png new file mode 100644 index 0000000..11dab10 Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/problem.png differ diff --git a/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/semantic_segmentation.png b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/semantic_segmentation.png new file mode 100644 index 0000000..dc247f7 Binary files /dev/null and b/Borgwards Self Driving Car Engineer-2018/Round - 2 - Assignement/image_rsrcs/semantic_segmentation.png differ diff --git a/ClassPass 2019 Software Engineer New Grad/README.md b/ClassPass 2019 Software Engineer New Grad/README.md new file mode 100644 index 0000000..0c5616d --- /dev/null +++ b/ClassPass 2019 Software Engineer New Grad/README.md @@ -0,0 +1,7 @@ +# Online Assessment + +## 1. Plane Seats +----- + +- Given a list of reserved seats on a plane, find the number of three-person families you can fit together in the unreserved seats. +- `2C` and `2D` are asile seats which are not in continuation diff --git a/ClassPass 2019 Software Engineer New Grad/planeSeats.py b/ClassPass 2019 Software Engineer New Grad/planeSeats.py new file mode 100644 index 0000000..66ba45d --- /dev/null +++ b/ClassPass 2019 Software Engineer New Grad/planeSeats.py @@ -0,0 +1,25 @@ +def solve(n, s): + seats1 = ["A", "B", "C"] + seats2 = ["D", "E", "F", "G"] + seats3 = ["J", "L", "I"] + + s_list = s.plit() + reserved = set([]) + for i in range(len(s_list)): + reserved.add(s_list[i]) + + count = 0 + for i in range(1, n + 1): + num = str(i) + if (num+seats1[0] not in reserved) and (num+seats1[1] not in reserved) and (num+seats1[2] not in reserved): + count += 1 + + if (num+seats3[0] not in reserved) and (num+seats3[1] not in reserved) and (num+seats3[2] not in reserved): + count += 1 + + if (num+seats2[0] not in reserved) and (num+seats2[1] not in reserved) and (num+seats2[2] not in reserved): + count += 1 + elif (num+seats2[1] not in reserved) and (num+seats2[2] not in reserved) and (num+seats2[3] not in reserved): + count += 1 + + return count diff --git a/Esri Deep Learning Engineer/README.md b/Esri Deep Learning Engineer/README.md new file mode 100644 index 0000000..a9789da --- /dev/null +++ b/Esri Deep Learning Engineer/README.md @@ -0,0 +1,42 @@ +## Technical Phone Interview +---- + +1. What does the error graph indicate when training error is less then validation error? +Ans. + - The model is over-fitting the training data. + +2. How can you prevent over-fitting? +Ans. + - By regularization we can prevent over-fitting + +3. What are dropouts? +Ans. + - Dropout is a type of over-fitting + - Dropouts help in preventing over-fitting + - Dropouts randomly skip the signal passing from the neurons. + - Because of random skipping it helps in avoiding the weights to explode. + +4. What is batch-normalization? +Ans. + - batch-normalization is a normalization of the batch data being processed + - If the data in it's raw format is normalized to get good results then same is the idea to normalize the data in the intermediary layers + +5. Importance of residual networks? +Ans. + - Residual Networks avoid over-fitting + - Even with increasing the layers the Residual Networks avoid over-fitting + +6. What is one hot encoding? +Ans. + - Transforming the data from raw to a vector which has only one value "1" and all other values "0" is called one hot encoding + + +7. Explain GAN? +Ans. + - GAN is a special neural networks. + - It has two networks. One is the Generator network and other is the Discriminator network. + - Generator tries to fool the Discriminator. + - Discriminator tries to avoid fooling by Generator. + - Both the network together achieve equilibrium where Discriminator network learns the distribution of the real data and produces data that is similar to that distribution. + +8. What all networks have you implemented? \ No newline at end of file diff --git a/INVIDI technologies Associate Software Developer 2019/README.md b/INVIDI technologies Associate Software Developer 2019/README.md new file mode 100644 index 0000000..77b3eb6 --- /dev/null +++ b/INVIDI technologies Associate Software Developer 2019/README.md @@ -0,0 +1,5 @@ +# Got these problems in online challenge (C++ only) + + +## 1. Custom Stack +----- diff --git a/INVIDI technologies Associate Software Developer 2019/stack.cpp b/INVIDI technologies Associate Software Developer 2019/stack.cpp new file mode 100644 index 0000000..9e8e9b6 --- /dev/null +++ b/INVIDI technologies Associate Software Developer 2019/stack.cpp @@ -0,0 +1,102 @@ + +#include +#include +#include + +using namespace std; + + +int operation(string &S, std::stack &nums, string &word, int i){ + int top_element; + int num1, num2; + + if (i == S.size() || S.at(i) == ' '){ + if (word == "DUP"){ + // push the top of stack + if (nums.size()>0){ + top_element = nums.top(); + nums.push(top_element); + } + else{ + return -1; + } + } + else if (word == "POP"){ + if (nums.size()>0){ + nums.pop(); + } + else{ + return -1; + } + } + else if (word == "+"){ + if (nums.size()>1){ + num1 = nums.top(); + nums.pop(); + num2 = nums.top(); + nums.pop(); + nums.push(num1+num2); + } + else{ + return -1; + } + } + else if (word == "-"){ + if (nums.size()>1){ + num1 = nums.top(); + nums.pop(); + num2 = nums.top(); + nums.pop(); + nums.push(num1-num2); + } + else{ + return -1; + } + } + else{ + nums.push(stoi(word)); + } + word = ""; + + } + + else{ + word = word+S.at(i); + + } + + return 0; +} + +int solution(string &S) { + int stop; + unsigned i; + string word = ""; + std::stack nums; + + for(i=0; i - Design Elevator - Cannot disclose - Jan 2019 - Cannot disclose + Amazon + SDE - 1 FinTech team + Feb 2019 + Amazon + + + + INVIDI + Software Developer 2019 + Feb 2019 + Online Assessment + + + + + Design Elevator + VISA Senior Software Engineer + + Part of VISA onsite @@ -109,10 +124,10 @@ - VISA - 2019 Software Engineer New Grad + VISA + 2019 Senior Software Engineer Oct 2018 - Round-1 Hackerrank Online Assessment,
Round-2 Technical Phone Interview + Round-1 Hackerrank Online Assessment,
Round-2 Technical Phone Interview,
Round-3 Onsite diff --git a/TwoSigma 2019 Software Engineer Investments/README.md b/TwoSigma Software Engineer Investments 2019/README.md similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/README.md rename to TwoSigma Software Engineer Investments 2019/README.md diff --git a/TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/README.md b/TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/README.md similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/README.md rename to TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/README.md diff --git a/TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/friendCircle.py b/TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/friendCircle.py similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/friendCircle.py rename to TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/friendCircle.py diff --git a/TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/longestChain.py b/TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/longestChain.py similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 1 - Hackerrank Online Assessment/longestChain.py rename to TwoSigma Software Engineer Investments 2019/Round 1 - Hackerrank Online Assessment/longestChain.py diff --git a/TwoSigma 2019 Software Engineer Investments/Round 2 - HR Interview/README.md b/TwoSigma Software Engineer Investments 2019/Round 2 - HR Interview/README.md similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 2 - HR Interview/README.md rename to TwoSigma Software Engineer Investments 2019/Round 2 - HR Interview/README.md diff --git a/TwoSigma 2019 Software Engineer Investments/Round 3 - Technical Phone Interview/README.md b/TwoSigma Software Engineer Investments 2019/Round 3 - Technical Phone Interview/README.md similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 3 - Technical Phone Interview/README.md rename to TwoSigma Software Engineer Investments 2019/Round 3 - Technical Phone Interview/README.md diff --git a/TwoSigma 2019 Software Engineer Investments/Round 3 - Technical Phone Interview/maximumSumCircularSubArray.py b/TwoSigma Software Engineer Investments 2019/Round 3 - Technical Phone Interview/maximumSumCircularSubArray.py similarity index 100% rename from TwoSigma 2019 Software Engineer Investments/Round 3 - Technical Phone Interview/maximumSumCircularSubArray.py rename to TwoSigma Software Engineer Investments 2019/Round 3 - Technical Phone Interview/maximumSumCircularSubArray.py diff --git a/VISA 2019 Software Engineer New Grad/README.md b/VISA Senior Software Engineer 2019/README.md similarity index 100% rename from VISA 2019 Software Engineer New Grad/README.md rename to VISA Senior Software Engineer 2019/README.md diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/README.md b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/README.md similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/README.md rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/README.md diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/flowerBouquets.py b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/flowerBouquets.py similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/flowerBouquets.py rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/flowerBouquets.py diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/images/BinaryJumpsExample.JPG b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/images/BinaryJumpsExample.JPG similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/images/BinaryJumpsExample.JPG rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/images/BinaryJumpsExample.JPG diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/images/FlowerBouquets.JPG b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/images/FlowerBouquets.JPG similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/images/FlowerBouquets.JPG rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/images/FlowerBouquets.JPG diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/maxStreak.py b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/maxStreak.py similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/maxStreak.py rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/maxStreak.py diff --git a/VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/powerJump.py b/VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/powerJump.py similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 1 - Hackerrank Online Assessment/powerJump.py rename to VISA Senior Software Engineer 2019/Round - 1 - Hackerrank Online Assessment/powerJump.py diff --git a/VISA 2019 Software Engineer New Grad/Round - 2 - Coding Phone Interview/README.md b/VISA Senior Software Engineer 2019/Round - 2 - Coding Phone Interview/README.md similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 2 - Coding Phone Interview/README.md rename to VISA Senior Software Engineer 2019/Round - 2 - Coding Phone Interview/README.md diff --git a/VISA 2019 Software Engineer New Grad/Round - 2 - Coding Phone Interview/isBinarySearchTree.py b/VISA Senior Software Engineer 2019/Round - 2 - Coding Phone Interview/isBinarySearchTree.py similarity index 100% rename from VISA 2019 Software Engineer New Grad/Round - 2 - Coding Phone Interview/isBinarySearchTree.py rename to VISA Senior Software Engineer 2019/Round - 2 - Coding Phone Interview/isBinarySearchTree.py diff --git a/Design Elevator/elevator.py b/VISA Senior Software Engineer 2019/Round - 3 - Onsite/Design Elevator/elevator.py similarity index 83% rename from Design Elevator/elevator.py rename to VISA Senior Software Engineer 2019/Round - 3 - Onsite/Design Elevator/elevator.py index 51fd1f4..19b39d6 100644 --- a/Design Elevator/elevator.py +++ b/VISA Senior Software Engineer 2019/Round - 3 - Onsite/Design Elevator/elevator.py @@ -1,8 +1,10 @@ +from collections import deque + class Elevator(object): def __init__(self): self.cf = 0 # current floor self.dirc = "NULL" - self.req = dequeu([]) + self.req = deque([]) self.reqSet = set([]) def in_cmg_req(self, floor): @@ -17,10 +19,10 @@ def process(self): if goal_floor not in self.reqSet: continue - self.get_direction(cf, gf) - self.go_to_dest(cf, goal_floor) + self.get_direction(self.cf, goal_floor) + self.go_to_dest(self.cf, goal_floor) - def get_direction(self, cf, gf): + def get_direction(self, cf, goal_floor): if cf > goal_floor: self.dirc = "DOWN" else: @@ -48,4 +50,4 @@ def openDoors(self): pass def closeDoors(self): - pass + pass \ No newline at end of file