ASPIRING MINDS CANDIDATE ABILITY REPORT - SIMPROG
Candidate's Simprog Performance Report
Name Pranav Yashwant Risbud AMCAT ID 11570069454309
Residence City N.A., NA Date of Birth (Gender) --(YYYY-MM-DD) (N.A.)
College N.A,N.A Degree (Stream) B.Tech/B.E. (IT)
Email ID
[email protected] Mobile No. 8806078696
Percentage Marks
(Passing Year) 10th- % (N.A.) 12th- % (N.A.) College - %(N.A.)
Report Details
Language Total Problems Total Time
Java 2 60 mins
Programming Ability Score
This score measures the ability to write thorough and correct code for a problem, use of best
practices in coding and efficiency of the code. 64 out of 100
*Percentiles for the score will be soon provided.
Problem Statement 1
Find if two strings are cyclic representations of each other.
For e.g. "abc", "cab" are cyclic representations but "abc", "cba" are not.
Input: Two strings x, y.
Output: An integer, 1 if the two strings are cyclic representations, -1 if they are not.
Note: A more detailed problem statement is shown to the candidates.
Candidate Source Code Results
Final Code Submitted Code Execution Summary
Code Compilation : Pass
1. public class Sam eReflection Compiler Warnings Generated : No
2. { Sample Test Cases Passed : 3/3
3.
Test cases shown to the candidate
4. public static int isSam eReflection(String word1,
String word2) Hidden Test Cases Passed : 3/3
5. { Test cases not shown to the candidate
6. if(word1.length()==word2.length())
7. {
8. int i,j; Warnings Generated
9. for(i=0;i<word1.length();i++)
10. { None
11. for(j=0;j<word2.length();j++)
12. { Average-Case Time Complexity Detected
13. if(word1.charAt(i)==word2.charAt(j))
14. {
O(N 2)
15. int flag=1;
16. int k=1; This problem can be ideally solved in O(N) time
17. while((flag==1)&&(k<word1.length()))
18. { *N represents the length of the input string
19. *Average Case Time Complexity is the order of performance of the algorithm given a random set of
if(word1.charAt((i+k)%word1.length())!=word2.charAt(( inputs. This complexity is measured here using the Big-O asymptotic notation.
j+k)%word2.length()))
20. {flag=0;break;} Test Case Execution Results(Cases Passed/ Total Cases)
21. else
22. k++; Basic 3/3
23. } They demonstrate the primary logic of the problem. They encompass situations which would be
24. if(flag==1) seen on an average and do not reveal situations which need extra checks/handles to be placed on
25. return 1; the logic.
26. } Advanced 1/1
27. } They contain pathological input conditions which would attempt to break codes which have
28. } incorrect / semi-correct implementations of the correct logic or incorrect / semi-correct
29. formulation of the logic.
30. Edge 2/2
31. } They specifically confirm whether the code runs successfully on the extreme ends of the domain of
32. return -1; inputs.
33. }} Total 6/6
Execution Statistics
Time Taken to Submit (hr:min:sec) : 00:17:25
Number of compiles attempts made : 5
Number of compilation attempts witnessing a successful
: 5
compile
Number of compile attempts witnessing a time-out : 0
Number of compile attempts witnessing runtime errors : 0
Avg. no. of cases passed in each compile : 86.7 %
Avg. time taken between each compile (hr:min:sec) : 00:02:38
Problem Statement 2
Given a pointer to any one node in a sorted circular linked list, insert a given number such that the linked list remains sorted.
Input: start-> pointer to a node in sorted circular linked list, n-> number to be inserted.
Output: Pointer to the node in the sorted circular linked list after insertion of number n.
Note: A more detailed problem statement is shown to the candidates.
Candidate Source Code Results
Final Code Submitted Code Execution Summary
Code Compilation : Pass
1. public class SortedList Compiler Warnings Generated : Yes
2. { Sample Test Cases Passed : 2/2
3. public static LNode insertSorted(LNode start, int n)
Test cases shown to the candidate
4. {
5. System .out.println(start); Hidden Test Cases Passed : 2/3
6. LNode new_node = new LNode(); Test cases not shown to the candidate
7. LNode start2 = new LNode();
8. start2=start;
9. Warnings Generated
10.
11. if(start==null) None
12. {
13. new_node.value = n; Average-Case Time Complexity Detected
14. new_node.next = new_node;
15. return new_node; O(N)
16. }
17. This problem can be ideally solved in O(N) time
18. do
19. { *N represents the number of elements in the input linked list
20. if((start.value)<=n & (start.next.value>=n) |
(start.next.value<=start.value & start.value<=n) | *Average Case Time Complexity is the order of performance of the algorithm given a random set of
inputs. This complexity is measured here using the Big-O asymptotic notation.
(start.next.value<=start.value & start.next.value>=n))
21. {
22. new_node.value = n; Test Case Execution Results(Cases Passed/ Total Cases)
23. new_node.next = start.next;
24. start.next = new_node; Basic 3/3
25. break; They demonstrate the primary logic of the problem. They encompass situations which would be
26. } seen on an average and do not reveal situations which need extra checks/handles to be placed on
27. else the logic.
28. { Advanced 1/1
29. start=start.next; They contain pathological input conditions which would attempt to break codes which have
30. } incorrect / semi-correct implementations of the correct logic or incorrect / semi-correct
formulation of the logic.
31.
32. }while(start!=start2); Edge 0/1
33. return new_node; They specifically confirm whether the code runs successfully on the extreme ends of the domain of
inputs.
34. }
35. public static void m ain(String[] args) Total 4/5
36. {
37. LNode out = new LNode(); Execution Statistics
38. LNode start = new LNode();
39. start.next = start;
40. int n=1; Time Taken to Submit (hr:min:sec) : 00:39:09
41. out =insertSorted(start, n); Number of compiles attempts made : 14
42. }
Number of compilation attempts witnessing a successful
43. } : 9
compile
Number of compile attempts witnessing a time-out : 0
Number of compile attempts witnessing runtime errors : 0
Avg. no. of cases passed in each compile : 71.1 %
Avg. time taken between each compile (hr:min:sec) : 00:01:25