Accolite interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Accolite
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data structure and algorithmoperating systemdbmsoopscomputer networkweb development
Tip
Tip

Tip 1 : Be very clear with your project explanation.
Tip 2 : Also try to cover all the cs core subjects explanation clearly.

Application process
Where: Campus
Eligibility: 6.5 cgpa and 65% 12th marks minimun requirement
Resume Tip
Resume tip

Tip 1 : Make it clean with appropriate knowledge.
Tip 2 : Provide true information and avoid telling lie in which You are not sure.

Interview rounds

01
Round
Medium
Video Call
Duration55 minutes
Interview date6 Aug 2021
Coding problem1

It was morning time and from 9:00 am . It happened via the google meet online process and it was very smooth onboarding . Interviewer was very friendly kind of nature .

1. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
PayUAtlassianAmazon

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Problem approach

#include 
#include 
using namespace std;

// Binary Tree node
struct Node {
int data;
struct Node *left, *right;
};

// function to print the zigzag traversal
void zizagtraversal(struct Node* root)
{
// if null then return
if (!root)
return;

// declare two stacks
stack currentlevel;
stack nextlevel;

// push the root
currentlevel.push(root);

// check if stack is empty
bool lefttoright = true;
while (!currentlevel.empty()) {

// pop out of stack
struct Node* temp = currentlevel.top();
currentlevel.pop();

// if not null
if (temp) {

// print the data in it
cout << temp->data << " ";

// store data according to current
// order.
if (lefttoright) {
if (temp->left)
nextlevel.push(temp->left);
if (temp->right)
nextlevel.push(temp->right);
}
else {
if (temp->right)
nextlevel.push(temp->right);
if (temp->left)
nextlevel.push(temp->left);
}
}

if (currentlevel.empty()) {
lefttoright = !lefttoright;
swap(currentlevel, nextlevel);
}
}
}

// A utility function to create a new node
struct Node* newNode(int data)
{
struct Node* node = new struct Node;
node->data = data;
node->left = node->right = NULL;
return (node);
}

// driver program to test the above function
int main()
{
// create tree
struct Node* root = newNode(1);
root->left = newNode(2);
root->right = newNode(3);
root->left->left = newNode(7);
root->left->right = newNode(6);
root->right->left = newNode(5);
root->right->right = newNode(4);
cout << "ZigZag Order traversal of binary tree is \n";

zizagtraversal(root);

return 0;
}

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date6 Aug 2021
Coding problem1

It was again the morning session and the interviewer was very supportive in nature and gave me the hint too to think the approach and finally i came up the solution which he was expecting.

1. DFS Traversal

Moderate
35m average time
65% success
0/80
Asked in companies
SamsungIntuitGoldman Sachs

Given an undirected and disconnected graph G(V, E), containing 'V' vertices and 'E' edges, the information about edges is given using 'GRAPH' matrix, where i-th edge is between GRAPH[i][0] and GRAPH[i][1]. print its DFS traversal.

V is the number of vertices present in graph G and vertices are numbered from 0 to V-1. 

E is the number of edges present in graph G.
Note :
The Graph may not be connected i.e there may exist multiple components in a graph.
Problem approach

#include 
using namespace std;

// Graph class represents a directed graph
// using adjacency list representation
class Graph {
public:
map visited;
map > adj;

// function to add an edge to graph
void addEdge(int v, int w);

// DFS traversal of the vertices
// reachable from v
void DFS(int v);
};

void Graph::addEdge(int v, int w)
{
adj[v].push_back(w); // Add w to v’s list.
}

void Graph::DFS(int v)
{
// Mark the current node as visited and
// print it
visited[v] = true;
cout << v << " ";

// Recur for all the vertices adjacent
// to this vertex
list::iterator i;
for (i = adj[v].begin(); i != adj[v].end(); ++i)
if (!visited[*i])
DFS(*i);
}

// Driver's code
int main()
{
// Create a graph given in the above diagram
Graph g;
g.addEdge(0, 1);
g.addEdge(0, 2);
g.addEdge(1, 2);
g.addEdge(2, 0);
g.addEdge(2, 3);
g.addEdge(3, 3);

cout << "Following is Depth First Traversal"
" (starting from vertex 2) \n";

// Function call
g.DFS(2);

return 0;
}

Try solving now
03
Round
Easy
Video Call
Duration20 minutes
Interview date7 Aug 2021
Coding problem1

It was really very cool, and felt very comformtable with the interviewer .

1. Operating System question

What is thread in OS?
 

Problem approach

Tip 1:Keep your answers with real life example.
Tip 2:Keep the answers very clear and crisp if you know.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Accolite
702 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Accolite
776 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Accolite
677 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 8 problems
Interviewed by Accolite
667 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes