Académique Documents
Professionnel Documents
Culture Documents
software Answers
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 1/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
Requirement analysis
Speci cation
Software architecture
Implementation
Testing
Documentation
Maintenance
[https://career.guru99.com/wp-
content/uploads/2017/11/ID-100354927.jpg]
Veri cation:
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 2/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
Validation:
8) How can you make sure that your code is both safe
and fast?
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 3/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
Decomposition technique
Empirical technique
Ad
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 6/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
Structured Charts
Structured English
Data Dictionary
37) How you can make sure that your written code which
can handle various kinds of error situation?
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 9/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 10/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
situations:
Code:
1 mport java.util.HashMap;
2
3 import java.util.Map;
4
5 import java.util.PriorityQueue;
6
7 public class PrioRQueueExample {
8
9 public static void main(String[] args){
10
11 PriorityQueue<Double> pq = new PriorityQueue<Double>((
12
13 PrioRQueueExample pqe = new PrioRQueueExample();
14
15 //Number of ATMs to return i.e. K
16
17 int num_ATMs = 3;
18
19 double curr_loc = 0.00;
20
21 Map<String,Double> nallATMLocs = new HashMap<String,Do
22
23 //Map of ATM names and their distance co-ordinates
24
25 nallATMLocs.put("atm1",45.0);
26
27 nallATMLocs.put("atm2",78.0);
28
29 nallATMLocs.put("atm3",54.0);
30
31 nallATMLocs.put("atm4",64.0);
32
33 nallATMLocs.put("atm5",35.0);
34
35 nallATMLocs.put("atm6",42.0);
36
37 nallATMLocs.put("atm7",57.0);
38
39 nallATMLocs.put("atm7",1.00);
40
41 nallATMLocs.forEach((atm,dist) ->{if(pq.size() < num_A
42
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 11/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
43 pq.add(pqe.getLocation(curr_loc,dist));}
44
45 else{
46
47 if( pq.peek() > pqe.getLocation(curr_loc,dist))
48
49 pq.poll();
50
51 pq.add(pqe.getLocation(curr_loc,dist));
52
53 }
54
55 }
56
57 });
58
59 pq.forEach(atmLoc -> System.out.println(atmLoc));
60
61 }
62
63 private double getLocation(double curr,double atm){
64
65 return atm - curr;
66
67 }
68
69 }
Top 100 C
Programming
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 12/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
5
REPLIES
jayashree
Reply
Pooja gowda
Reply
Rishabh Sharma
Reply
admin
Error corrected!
Reply
Sony
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 13/14
8/10/2019 Top 50 Software Engineering Interview Questions and Answers
Reply
https://career.guru99.com/top-50-software-engineering-interview-questions-and-answers/ 14/14