Founding year | 2003 |
Company Website | https://www.revesoft.com/ |
Career Website | https://www.revesoft.com/ |
Technologies Used | Java, Kotlin, Swift |
REVE Systems specializes in delivering VoIP (Voice over IP) software solutions, with a focus on mobile VoIP, softswitch, and billing solutions. They have different departments such as Research & Development (R&D), E-Gov, Reve Chat, etc. In this article, the recruitment process for the R&D department for the DEV roles (Junior Software Engineer) is presented. They perform campus recruitment. At first, all the CVs from the participants (final year undergrad students who were to graduate soon) were collected. Then, an online MCQ-based exam was carried out, followed by two online technical rounds. At last, an onsite CTO round was performed.
Reverse a given singly linked list.
At first, I used extra memory to store the reversed array.
class Solution {
public:
ListNode* reverseList(ListNode* head) {
if (head == NULL || head->next == NULL)
return head;
int i;
vector<int> v;
ListNode* cur = head;
while (cur != NULL) {
v.push_back(cur->val);
cur = cur->next;
}
i = v.size()-1;
cur = head;
while (head != NULL) {
head->val = v[i];
i--;
head = head->next;
}
return cur;
}
};
They told me not to use extra memory. So, I performed an in-place reversal of the linked list.
class Solution {
public:
ListNode* reverseList(ListNode* head) {
if (head == NULL || head->next == NULL)
return head;
ListNode* prev = NULL;
while (head != NULL) {
ListNode* tmp = head->next;
head->next = prev;
prev = head;
head = tmp;
}
return prev;
}
};
Given a sequence 1
, 1
, 2
, 3
, 5
, 8
, 13
, 21
…, where the indices start at 1
. For any given index, find the value of the sequence. For example, when the input is 3
, the output is 2
, and when the input is 6
, the output is 8
.
At first, I used an array for storing the calculated results of the intermediate steps and built the array going forward.
int fib(int n){
int arr[n + 1];
arr[1] = 1;
arr[2] = 1;
int i;
for (i = 3; i <= n; i++) {
arr[i] = arr[i-1] + arr[i-2];
}
return arr[n];
}
As I used an array to store the intermediate results, extra memory usage was involved. They told me not to use an array. Then I used three variables and performed swapping values as needed.
int fib(int n){
int a, b, c = 1;
a = 1;
b = 1;
int i;
for (i = 3; i <= n; i++) {
c = a + b;
a = b;
b = c;
}
return c;
}
They asked me to solve this problem using recursion. When implementing the recursion-based one, I first implemented the unoptimized version and later used an array for storing the intermediate values. After that, they asked me about the time and space complexities of the different approaches.
int fib(int n){
if (n == 1)
return 1;
else if (n == 2)
return 1;
else
return (fib(n-1) + fib(n-2));
}
Given a weighted binary tree, you have to find whether a target sum can be achieved by traversing from the root to the leaf and summing the values on the intermediate nodes.
I described how this problem can be solved using BFS and provided the solution.
class Solution {
public:
bool hasPathSum(TreeNode* root, int targetSum) {
if (root == NULL)
return false;
else if (root->left == NULL && root->right == NULL)
return (root->val == targetSum);
queue<TreeNode*> q;
bool found = false;
q.push(root);
while (!q.empty()) {
TreeNode* cur = q.front();
q.pop();
if (cur->left == NULL && cur->right == NULL) {
if (cur->val == targetSum) {
found = true;
break;
}
}
if (cur->left != NULL) {
cur->left->val = cur->val + cur->left->val;
q.push(cur->left);
}
if (cur->right != NULL) {
cur->right->val = cur->val + cur->right->val;
q.push(cur->right);
}
}
return found;
}
};
Why are getters and setters used in Java?
Describe the Singleton design pattern and write the code in Java.
What are REST APIs? Tell about the HTTP verbs and the differences between PUT and POST in REST API.
Given a large input string without \n
present. Output the string of sentences where we will input the max letter count in a line. output the modified string, so if line breaks occur in the middle of a word, place it after a newline.
Input: (“reve systems is a software company”, 11)
Output:
reve
systems is
a software
company
What are the four pillars of OOP?
Explain about Encapsulation
, Abstraction
, Inheritance
, and Polymorphism
with real-world examples.
Please tell us about Java Socket Programming.
What models are used in the Software development life cycle? Please tell us about the waterfall model.
Please explain the Agile model in software engineering.
What are the SOLID principles?
What are the differences between the TCP and UDP protocols?
Given two input strings, you have to find whether the second string is present in the first string. Please explain all the approaches for solving this problem.
Do you have a plan for higher studies? When will you go abroad for higher studies?
Please tell us about yourself.
Why do you want to join a software company instead of joining a university as a faculty member?
Write the code of the Singleton pattern and explain.
Explain the four pillars of OOP with examples.
Actually they asked all the questions from the previous rounds where I made mistakes.