Standard Chartered
10+ The Scalers Interview Questions and Answers
Q1. Maximum Frequency Number Problem Statement
Given an array of integers with numbers in random order, write a program to find and return the number which appears the most frequently in the array.
If multiple elem...read more
Q2. Occurrence of Each Word: Problem Statement
You are given a string S
consisting of several words. Your task is to count the number of times each word appears in string S
. A word is defined as a sequence of one o...read more
Count the occurrence of each word in a given string.
Split the string into words using spaces as delimiters.
Use a hashmap to store the count of each word.
Iterate through the words and update the count in the hashmap.
Output each unique word with its occurrence count.
Q3. Mike and Mobile Problem Statement
Mike, a little boy who loves solving math problems, was playing with his mom's mobile phone. The mobile keypad includes 12 buttons: 10 digit buttons (0-9) and 2 non-digit butto...read more
Q4. Anagram Pairs Verification Problem
Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more
Check if two strings are anagrams of each other by comparing their sorted characters.
Sort the characters of both strings and compare them.
Use a dictionary to count the frequency of characters in each string and compare the dictionaries.
Ensure both strings have the same length before proceeding with comparison.
Handle edge cases like empty strings or strings with different lengths.
Q5. Remove Duplicates Problem Statement
You are given an array of integers. The task is to remove all duplicate elements and return the array while maintaining the order in which the elements were provided.
Example...read more
Q6. Palindromic Substrings Problem Statement
Find the total number of palindromic substrings in a given string STR
.
Example:
Input:
"abbc"
Output:
5
Explanation:
The palindromic substrings are: ["a", "b", "b", "c",...read more
Count the total number of palindromic substrings in a given string.
Iterate through each character in the string and expand around it to find palindromic substrings.
Use dynamic programming to store previously calculated palindromic substrings.
Consider both odd and even length palindromes while counting.
Example: For input 'abbc', palindromic substrings are ['a', 'b', 'b', 'c', 'bb']. Total count is 5.
To find the 4th highest salary from a table in a database, you can use a SQL query with the ORDER BY and LIMIT clauses.
Write a SQL query to select distinct salaries from the table in descending order.
Use the LIMIT clause to retrieve the 4th row from the sorted list.
The query would look like: SELECT DISTINCT salary FROM table_name ORDER BY salary DESC LIMIT 3, 1
Q8. what is ur purpose of leaving ur ofz
I am looking for new challenges and growth opportunities.
Seeking a more challenging role
Looking for opportunities to learn and grow
Want to work with new technologies
Desire to work in a different industry
Seeking better work-life balance
Q9. How to call rest API
To call a REST API, you can use tools like Postman or code in languages like JavaScript or Python.
Use tools like Postman to make HTTP requests to the API endpoints
In programming languages like JavaScript, use libraries like Axios or Fetch to make API calls
Include necessary headers, parameters, and authentication tokens in the request
Handle the response data accordingly, whether it's JSON, XML, or other formats
Q10. Explain Encapsulation
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit.
Encapsulation helps in hiding the internal state of an object and only exposing necessary functionalities.
It allows for better control over the data by preventing direct access from outside the class.
Encapsulation also helps in achieving data abstraction and information hiding.
Example: In a class representing a car, the variables like speed and fuel level can be encapsulated ...read more
More about working at Standard Chartered
Interview Process at The Scalers
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month