Software Engineer I Interview Questions | Glassdoor

Software Engineer I Interview Questions

663

Software engineer i interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

Software Engineering Intern I at National Instruments was asked...

Oct 20, 2012
 Find the average value of a binary tree both recursively and iteratively. Explain why iteratively may be preferred over recursively. 2 Answers Iteratively should theoretically be more efficient. No function calls, uses less memory, etc. method 1 ; inorder sort method 2 augmented BST with size as extra data

Software Engineer I at Amazon was asked...

Oct 3, 2012
 Given any string, find the index of the start of the first duplicated 3-letter subsequence. For example, in abcabcdef, it would be 0, and abcdefdef would be 3, and then abcdefkajdkffatabcdef would be 0, and abcdefkajdkffatdef would be 3. 2 Answers Tried brute forcing it, O(n^2) too bad. Did it using HashTables. Here is an O(N) solution with HashMap. By the way, I think the fail case should be -1 instead of zero since zero is a valid possibility. public static int findDuplicate3Chars(String s) { HashMap map = new HashMap(); StringBuilder b = new StringBuilder(); int inputLength = s.length() - 3; for (int i = 0; i < inputLength; i++) { for (int j = 0; j < 3; j++) { b.append(s.charAt(i + j)); } String key = b.toString(); if (map.containsKey(key)) { return map.get(key); } map.put(key, i); b.setLength(0); } return -1; }

Software Development Engineer I at Amazon was asked...

Jun 19, 2011
 Discuss finding the most efficient route in terms of cost and time for moving products through warehouses to customers. Explain algorithm complexity. 2 Answers Breadth-first traversal of a graph shortest path algoritm

Software Development Engineer In Test I (SDET) at Amazon was asked...

Sep 28, 2012
 You are given a n*n matrix of bits (1s and 0s) where 1 represents land and 0 represents water. Adjacent 1s can be considered as joined together to form sort of island in water. Count the number of islands. Discuss complexity. 2 Answers int nCnt = 0; int land = 0; boolean bIsOne = false; int a[rows][cloumns]; int i,j; for(i = 0;i 1) { land ++; } nCnt = 0; bIsOne = false; } } } } My runnable code is here. With the use of DFS, it is very straightforward! public class Island{ int[][] map; boolean[][] visited; int maxRow, maxCol; public Island(int [][] map){ this.map = map; maxRow = map.length - 1; maxCol = map[0].length - 1; visited = new boolean[maxRow + 1][maxCol + 1]; } public int islandCount(){ int count = 0; for(int i = 0; i maxRow || j > maxCol) return; if(!visited[i][j] && map[i][j] == 1) { visited[i][j] = true; runDFS(i - 1, j); runDFS(i , j + 1); runDFS(i + 1, j); runDFS(i , j + 1); } } public class questions{ public static void main(String [] args){ int [][] map = new int [][]{ {1, 1, 1, 1, 0}, {0, 1, 0, 1, 0}, {0, 1, 1, 0, 1} }; Island island = new Island(map); System.out.println(island.islandCount()); } }

Software Development Engineer I at Amazon was asked...

Jan 8, 2016
 Write a program that gives suggestions for purchases based on a a database of customer purchases for the past day 1 Answer The entire day was to write this one program. So I wrote a Java program that just made some basic SQL matches on the database.

Software Engineer I at AmTrust Financial was asked...

Sep 19, 2015
 Do you know .net? 1 Answer Yes

Software Engineer I at Kroll Ontrack was asked...

Jun 9, 2009
 Describe a time when you made a split-second decision and decided not to follow through with it. 2 Answers This was the only question I couldn't really answer. Any other questions you could remember off the top of your head?

Software Development Engineer I Intern at Amazon was asked...

Apr 24, 2015
 Graph coding question regarding showing all the possible movies that contain the same themes. 1 Answer Used a priority queue with a comparator.

Software Development Engineer I Intern at Amazon was asked...

Mar 20, 2015
 Give you an array of integers without duplication. Let you write a piece of code to return the pairs that their sum is 100. 2 Answers Use hash map or dynamic programming. Simple two sum question. using hash map

Software Development Engineer I at Microsoft was asked...

Jan 3, 2013
 Implement a queue using a circular data structure. Provide put and get functions. Also talked about how to provide thread safety. 1 Answer Used linked list with head and tail pointers.
1120 of 663 Interview Questions