
Akamai Technologies


20+ Akamai Technologies Software Engineer Interview Questions and Answers
Q1. There are 12 balls which are identical in size and appearance but one is an odd weight (could be light or heavy). Find it in minimum number of weighings using a balance
Find odd weight ball among 12 identical balls using a balance in minimum weighings.
Divide balls into 3 groups of 4 each
Weigh any 2 groups against each other
If both groups weigh the same, the odd ball is in the third group
If one group is heavier, weigh any 2 balls from that group against each other
If they weigh the same, the odd ball is the remaining one
If one ball is heavier, it is the odd ball
Repeat the process with the lighter group if the odd ball is light
Q2. 4. Which traversal would I prefer for finding a cycle in a graph?
I would prefer Depth First Search (DFS) traversal for finding a cycle in a graph.
DFS is better suited for finding cycles in a graph as it explores deeper into the graph before backtracking.
DFS can detect a cycle in a graph in O(V+E) time complexity.
DFS can be implemented using recursion or a stack.
Breadth First Search (BFS) can also be used to find cycles but it is less efficient than DFS.
In DFS, we can keep track of visited nodes and parent nodes to detect a cycle.
Q3. Implementation of all linked list operations from scratch and reverse it.
Implementing all linked list operations from scratch and reversing it.
Start by creating a Node class with data and next pointer
Implement insert, delete, search, and traverse operations
To reverse the linked list, use three pointers to reverse the direction of the links
Make sure to handle edge cases such as empty list and single node list
Q4. Given a String find the lexicographically lowest substring containing k number of 1s
Find the lexicographically lowest substring with k 1s in a given string.
Iterate through the string and maintain a sliding window of size k.
Keep track of the count of 1s in the window and update the result if a valid substring is found.
Return the lexicographically lowest substring with k 1s.
Q5. Program to swap kth and kth to last element of a singly linked list in one pass. You are not given the length of the linked list before hand
Swap kth and kth to last element of a singly linked list in one pass without knowing the length of the list.
Traverse the linked list using two pointers, one starting from the head and the other starting from kth node.
When the second pointer reaches the end of the list, the first pointer will be pointing to the kth to last node.
Swap the values of kth and kth to last node.
Handle edge cases such as k being out of bounds or kth and kth to last node being the same.
Return the modif...read more
Q6. You are given two cubes. Represent the date of a month (01 31) using both the cubes by placing numbers on the given cubes
Representing date of a month using two cubes with numbers 0-9 on each face
Assign numbers 0-9 on each face of both cubes
Use one cube to represent tens digit and other for ones digit
Rotate cubes to display desired date
Example: Cube 1 - 0, 1, 2, 3, 4, 5; Cube 2 - 0, 1, 2, 6, 7, 8; To represent 23, Cube 1 shows 2 and Cube 2 shows 3
Q7. Find unique and duplicate elements in an array.
To find unique and duplicate elements in an array.
Create two empty arrays, one for unique elements and one for duplicates.
Loop through the array and check if the element is already in the unique array.
If it is, add it to the duplicates array. If not, add it to the unique array.
Return both arrays.
Q8. Program to find the length of the longest substring without repeating characters in a string
Program to find length of longest substring without repeating characters in a string.
Use a sliding window approach to traverse the string
Use a hash set to keep track of unique characters in the current substring
Update the length of longest substring without repeating characters as you traverse the string
Q9. SQL question to find third highest salary.
SQL query to find third highest salary.
Use ORDER BY and LIMIT to get the third highest salary.
Use subquery to avoid duplicates in case of multiple employees having same salary.
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 2,1;
Q10. Given an array containing repeated characters, find the character repeated most number of times
Find the character repeated most number of times in an array of strings.
Create a dictionary to store character count
Iterate through each string and character
Return the character with highest count
Q11. Program to find the intersection point of two singly linked lists in O(n)
Program to find intersection point of two singly linked lists in O(n)
Traverse both lists and find their lengths
Move the head of the longer list by the difference in lengths
Traverse both lists in parallel until intersection point is found
Return the intersection point
Q12. Program to reverse a singly linked list both recursively and iteratively
Program to reverse a singly linked list both recursively and iteratively
Iteratively: Use three pointers to reverse the links between nodes
Recursively: Use a recursive function to reverse the links between nodes
In both approaches, update the head and tail pointers accordingly
Q13. Program to reverse a singly linked list in groups of k recursively
A program to reverse a singly linked list in groups of k using recursion.
Create a recursive function that takes the head of the linked list and the group size as parameters.
If the remaining list has less than k nodes, return the head as it is.
Reverse the first k nodes by recursively calling the function for the next group.
Connect the reversed group to the remaining list.
Return the new head of the reversed list.
Q14. Program to reverse the ordering of words in a sentence
Program to reverse the ordering of words in a sentence
Split the sentence into an array of words
Reverse the array
Join the array into a sentence
Q15. Trace the output of a C/C++ code snippet containing extensive pointers and references
Answering a question on tracing output of C/C++ code snippet with pointers and references
Understand the code and identify all pointers and references
Trace the values of each pointer and reference at each step
Follow the flow of the code to determine the final output
Q16. Design the underlying data structure behind a login page
The data structure behind a login page should store user credentials securely.
Use a database to store user information
Hash and salt passwords for security
Include fields for username, email, password, and possibly additional information
Consider implementing two-factor authentication
Q17. Difference between Abstract class and interface
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, fields, and methods, while interface cannot have any implementation.
A class can only extend one abstract class, but can implement multiple interfaces.
Abstract classes are used to define a common behavior for subclasses, while interfaces are used to define a contract for classes to implement.
Example: Abstract class 'Animal' with a...read more
Q18. Explain time and space complexities of hashmap
Hashmap has constant time complexity for insertion, deletion, and retrieval, but requires additional space.
Hashmap provides constant time complexity O(1) for insertion, deletion, and retrieval operations on average.
The space complexity of a hashmap is proportional to the number of elements stored in it.
Hashmap uses a hash function to map keys to indices in an underlying array, which allows for efficient lookup.
In case of collisions, where multiple keys map to the same index, ...read more
Q19. Types of inter process communication.
Inter process communication (IPC) allows processes to communicate with each other and share resources.
Shared memory
Pipes
Sockets
Message queues
Signals
Q20. Explain segmentation fault
Segmentation fault is a type of error that occurs when a program tries to access a memory location that it is not allowed to access.
Segmentation fault is also known as a segfault.
It is a common error in C and C++ programming languages.
It occurs when a program tries to read or write to a memory location that it does not have permission to access.
This can happen when a program tries to access an uninitialized pointer or when it tries to access memory that has already been freed...read more
Q21. Explain BFS and DFS
BFS and DFS are graph traversal algorithms used to search for nodes in a graph.
BFS stands for Breadth First Search and explores all the nodes at the current depth before moving to the next level.
DFS stands for Depth First Search and explores as far as possible along each branch before backtracking.
BFS uses a queue data structure while DFS uses a stack or recursion.
BFS is useful for finding the shortest path in an unweighted graph while DFS is useful for topological sorting an...read more
More about working at Akamai Technologies




Interview Process at Akamai Technologies Software Engineer

Top Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

