# Sigmoid Analytics Company Interview Experience

**Sigmoid company visited for the full time role**

** Eligibility**: 5 CPI and above

Location: Bangalore

Profile: ASDE [Assistant Software Development Engineer]

**Note**:3 months Probation Period after joining

**Service Bond**: 2 year

** Process Details: **Resume Based Shortlisting

**>>**Online Test

**>>**Interviews

**Round 2 (1 hour):**

This was a coding round. Total 10 question where as 6 question objective like as aptitude, puzzle and 4 question based on coding.

**Coding question 1**:**Count occurrences**

You are given a particular string S, Which contains only lowercase English alphabets. your task is to calculate all the occurrences of the character and print the character in the order in which it appears in the string S followed by the number of occurrences.

Each character should appear only once in the output.

**Input Format**

- The first line contains an integer, T, denoting the number of test cases.
- Next T lines contain string S each.

**Output format **

For each test case, print the output in a new line.

Constraints

1<=T<=1000

1<=|S|<=1000 where S denote the length of string

*Sample input:*

*1*

*occurrences*

*output:*

*01c3u1r2e2n1s1*

**Coding Question 2: Sum of sub-arrays**

An array X consists of N elements. You are given an integer K.

Write a program to find the sum of the length of the sub-array with K as its maximum number. Any two sub-arrays

that are consider should not overlap each other. find the maximum possible sum.

Input format:

- First line: T(number of test cases)

for each test cases

- First line: N and K
- Second line: N space separated integers (denoting the element of the array)

Output Format:

for each test case, print the maximum sum.

**Coding Question 3: Count the prime factors**

You are given two integer M and N. You have to find the prime factors of all the numbers in the range[M, N](both inclusive).

Write a program to find the number of times a prime number P comes in the prime factorization of the numbers in the range . Print the answer multiplied by number K.

**Input format:**

- First line: T(number of test cases)

for each test case

- first line: Four space: separated integers M, N, P, and K.

**Output Format**:

For each test case print the answer in a new line

**Coding Question 4: Rearranging arrays**

You are given an array A containing N elements and you are required to do the following:

- Remove every occurrence of the number X from this array
- Move all the remaining elements to the right by preserving the original order of the elements.
- Fill the empty spots on the left side with 1.

write a program to print the rearranged array.

**Input Format:**

- First line; T(number of test case)
- first line in each test case: N
- Second line in each test case: N space- separated integers (denoting the array Ai)
- Third line in each test case: X

**Output Format**

For each test case print the elements of rearrange array separated by space in a new line

Constraints:

1<=T<=5

1<=N<=10pow6

0<=Ai<=10pow9

1<=X<=10pow9

Sample Input:

2

5

22 1 34 22 16

22

7

3 5 3 5 5 11 5

5

Sample output:

1 1 1 34 16

1 1 1 1 3 3 11

**Question: In c, what is the output of the following declaration:**

int (*ptr)[10];

- ptr is an array of pointer to 10 integers
- ptr is a pointer to an array of 10 integers
- ptr is an array of 10 integers
- ptr is a pointer to an array

Question: What does the following declaration signify?

int (*pf)();

- pf is a pointer to a function
- pf is a function pointer
- pf is a pointer to a function which returns ‘int’.
- pf is a function of a pointer variable.

**Round 3: Skype interview(45 min)**

interviewer asked only one question.

Write a code of doubly linked list and remove duplicate

Thank you

please like.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer **Complete Interview Preparation Course****. **In case you are prepared, test your skills using **TCS**, **Wipro**, **Amazon**. **Google** , **E-Litmus** and **Microsoft** Test Serieses.