Epicor Software Corporation
Sparsh Communications Interview Questions and Answers
Q1. to code program which tells if 2 words are anagrams and also program to print a sentence with reverse order of words
Program to check if 2 words are anagrams and to print a sentence with reverse order of words.
Create a function to check if two words are anagrams by sorting the characters in each word and comparing them.
Create a function to reverse the order of words in a sentence by splitting the sentence into words, reversing the order, and joining them back together.
Use arrays of strings to store the words in the sentence and the two words to check for anagrams.
Q2. program for sorting (selection sort, insertion sort)
Selection sort and insertion sort programs for array of strings
Selection sort: Find the smallest element in the array and swap it with the first element, repeat for remaining elements
Insertion sort: Iterate through the array, for each element, compare with previous elements and insert in correct position
Q3. to create a simple login page in html
Create a simple login page in HTML
Use <form> element to create a form for login
Include <input> elements for username and password
Add a <button> element for submitting the form
Use CSS for styling the login page
Q4. 3. String str= abaaac find occurrence of consecutive chars
Count the occurrences of consecutive characters in a given string.
Iterate through the string and compare each character with the next one
Keep track of the count when consecutive characters are found
Store the consecutive characters and their counts in an array of strings
Q5. Explained MVC patterns used in the application
MVC (Model-View-Controller) is a software design pattern that separates the application logic into three interconnected components.
Model represents the data and business logic
View displays the user interface
Controller handles user input and updates the model and view accordingly
Example: In a web application, the model could be a database, the view could be an HTML page, and the controller could be a server-side script
Q6. 2. Second Largest Element from an array.
Find the second largest element in an array of strings.
Convert the strings to integers for comparison.
Sort the array in descending order.
Return the second element in the sorted array.
Q7. Find unique characters from string
To find unique characters from a string, we can iterate through the string and store each character in a set to check for uniqueness.
Iterate through the string and store each character in a set
Check if the character already exists in the set, if not add it
Return the set of unique characters
More about working at Epicor Software Corporation
Interview Process at Sparsh Communications
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month