Symphony Talent
JSC Institute Interview Questions and Answers
Q1. Character Counting Challenge
Create a program that counts and prints the total number of specific character types from user input. Specifically, you need to count lowercase English alphabets, numeric digits (0-...read more
Create a program to count lowercase alphabets, digits, and white spaces in user input until '$' is encountered.
Read characters from input stream until '$' is encountered
Count lowercase alphabets, digits, and white spaces separately
Print the counts of each character type as three integers separated by spaces
Q2. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Use Floyd's Tortoise and Hare algorithm to detect a cycle in O(N) time complexity and O(1) space complexity.
Start with two pointers, slow and fast, moving at different speeds. If they meet at some point, there is a cycle.
If the fast pointer reaches the end of the list (null), there is no cycle.
Check if the next pointer of each node points to a previously visited no...read more
Q3. Height of Binary Tree
You are provided with the Inorder and Level Order traversals of a Binary Tree composed of integers. Your goal is to determine the height of this Binary Tree without actually constructing i...read more
Find the height of a Binary Tree given its Inorder and Level Order traversals without constructing it.
Use the properties of Inorder and Level Order traversals to determine the height of the Binary Tree.
The height of a Binary Tree is the number of edges on the longest path from the root to a leaf node.
Consider edge cases like a single node tree or empty tree while calculating the height.
Q4. Merge Sort Linked List Problem Statement
You are given a singly linked list of integers. Your task is to sort the linked list using the merge sort algorithm.
Explanation:
Merge Sort is a divide and conquer algo...read more
Implement merge sort algorithm to sort a singly linked list of integers.
Divide the linked list into two halves using slow and fast pointers.
Recursively sort the two halves.
Merge the sorted halves using a merge function.
Handle the base case of empty or single node list.
Ensure the termination of the linked list with -1 at the end.
Example: For input 3 1 2 -1, output should be 1 2 3 -1.
Q5. Spiral Matrix Problem Statement
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
Input
The first line contains an integer 'T' which denotes the number of ...read more
The task is to return the spiral path of elements in a given matrix.
Iterate through the matrix in a spiral path by adjusting the boundaries at each step.
Keep track of the direction of traversal (right, down, left, up) to cover all elements.
Handle edge cases like when the matrix is a single row or column.
Implement a function that takes the matrix dimensions and elements as input and returns the spiral path.
Q6. Matrix Symmetry Check Problem Statement
You are provided with a square matrix. Your task is to determine if the matrix is symmetric. Return true
if it is symmetric, otherwise return false
.
A matrix is considere...read more
Determine if a square matrix is symmetric by checking if its transpose is equal to itself.
Iterate through the matrix and compare each element with its corresponding element in the transpose
If any pair of elements are not equal, return false immediately
If all pairs are equal, return true at the end
Q7. what do you mean by responsive website?
A responsive website is one that adapts to different screen sizes and devices.
Uses flexible layouts and images
Uses media queries to adjust styles based on screen size
Provides optimal user experience on all devices
Examples: Amazon, Netflix, and Google
Q8. Prepare a design for the given problem statement.
Design a system for real-time monitoring of temperature and humidity in a warehouse.
Utilize IoT sensors to collect temperature and humidity data
Implement a centralized database to store the data
Develop a web-based dashboard for real-time monitoring
Set up alerts for abnormal temperature or humidity levels
Q9. what does mean by DocType?
DocType is an HTML declaration that defines the version of HTML used in a web page.
DocType is placed at the beginning of an HTML document.
It informs the browser about the version of HTML used in the document.
It helps the browser to render the web page correctly.
There are different types of DocTypes available such as HTML5, XHTML, HTML 4.01, etc.
Interview Process at JSC Institute
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month