Daffodil Software
20+ Glencore Information Services Interview Questions and Answers
Q1. Triangle of Numbers Pattern
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
Example:
Input:
N = 4
Output:
1
232
34545
4567654
Explanation:
The pattern comprises n...read more
Print a triangle pattern of numbers based on given input 'N'.
Iterate through each row and print the numbers in a centered and incremented manner
Use nested loops to handle the alignment and incrementing of numbers
Ensure to properly format the output with spaces for alignment
Q2. Find the Longest Palindromic Substring
Given a string ‘S’ composed of lowercase English letters, your task is to identify the longest palindromic substring within ‘S’.
If there are multiple longest palindromic ...read more
Find the longest palindromic substring in a given string, returning the rightmost one if multiple substrings are of the same length.
Iterate through each character in the string and expand around it to find palindromic substrings
Keep track of the longest palindromic substring found so far
Return the rightmost longest palindromic substring
Q3. Find the Second Largest Element
Given an array or list of integers 'ARR', identify the second largest element in 'ARR'.
If a second largest element does not exist, return -1.
Example:
Input:
ARR = [2, 4, 5, 6, ...read more
Find the second largest element in an array of integers.
Iterate through the array to find the largest and second largest elements.
Handle cases where all elements are identical.
Return -1 if second largest element does not exist.
Q4. Minimum Operations to Transform Strings
You are provided with two strings initial
and final
. Each string consists of characters 'a', 'b', and one empty slot represented by '_'. Your task is to transform the ini...read more
The task is to transform one string into another by swapping characters with an empty slot, using the minimum number of operations.
Iterate through the strings character by character and count the number of operations needed to transform one string into another.
Consider the allowed operations and their conditions while counting the operations.
Return the total number of operations needed for each test case.
Q5. MegaPrime Numbers Problem Statement
Given two integers Left
and Right
, determine the count of 'megaprime' numbers within the inclusive range from 'Left' to 'Right'. A 'megaprime' number is a prime number where ...read more
Count the 'megaprime' numbers within a given range of integers.
Iterate through the range of integers from Left to Right.
For each number, check if it is a prime number and if all its digits are prime.
Increment the count if the number satisfies the conditions.
Return the total count of 'megaprime' numbers.
Q6. Digits Decoding Problem
Ninja has a string of characters from 'A' to 'Z', encoded using their numeric values (A=1, B=2, ..., Z=26). The encoded string is given as a sequence of digits (SEQ). The task is to dete...read more
The task is to determine the number of possible ways to decode a sequence of digits back into a string of characters from 'A' to 'Z'.
Use dynamic programming to keep track of the number of ways to decode the sequence at each position.
Consider different cases for decoding single digits and pairs of digits.
Handle edge cases such as '0' and '00' appropriately.
Return the final count modulo 10^9 + 7 as the answer.
Q7. Distribute N Candies Among K People
Explanation: Sanyam wishes to distribute 'N' candies among 'K' friends. The friends are arranged based on Sanyam's order of likeness. He initially distributes candies such th...read more
Distribute N candies among K people in a specific order, incrementing by K each round until all candies are distributed.
Distribute candies starting from 1st friend, incrementing by K each round
If remaining candies are fewer than what a friend is supposed to receive, distribute all remaining candies to that friend
Output the number of candies each friend ends up with at the end of distribution
Q8. 5. Find the largest prime number in array? (Use the Concept of Segmented Sieve)
Find the largest prime number in array using Segmented Sieve.
Implement Segmented Sieve algorithm to generate prime numbers up to the maximum value in the array.
Iterate through the array and check if each number is prime using the generated prime numbers.
Return the largest prime number found in the array.
OOP concepts in C++ include classes, objects, inheritance, polymorphism, and encapsulation.
Classes are user-defined data types that contain data members and member functions.
Objects are instances of classes that can interact with each other.
Inheritance allows a class to inherit properties and behavior from another class.
Polymorphism enables objects to be treated as instances of their parent class.
Encapsulation restricts access to certain components of a class, protecting data...read more
Q10. 2. What is OOPs and their concepts ?
OOPs stands for Object-Oriented Programming and it is a programming paradigm based on the concept of objects.
OOPs is based on four main concepts: Encapsulation, Inheritance, Polymorphism, and Abstraction.
Encapsulation is the process of hiding the implementation details of an object from the outside world.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects of different classes to be treated as if they were of the same cla...read more
Q11. 4. Program to print the pattern? (It was easy)
Program to print a given pattern using an array of strings.
Create an array of strings to hold the pattern
Use nested loops to iterate through the array and print the pattern
Adjust the loops to print the desired pattern
Example: for a right triangle pattern, use i for rows and j for columns, and print '*' if j<=i
Q12. the process of assigning a code to something for classification or identification.
The process is called coding and it involves assigning a unique code to something for identification or classification.
Coding is used in various fields such as software development, medical coding, and data analysis.
The codes assigned can be alphanumeric or numeric depending on the system used.
Examples of coding systems include ASCII, Unicode, ICD-10, and CPT codes.
Coding helps in organizing and managing large amounts of data efficiently.
Q13. Your qolificetion
I have a Bachelor's degree in Computer Science and 5 years of experience as a Software Developer.
Bachelor's degree in Computer Science
5 years of experience as a Software Developer
Q14. string reverse without use of pre defined functions
Reverse a string without using pre-defined functions.
Iterate through the string from the last character to the first.
Create a new string and append each character to it in reverse order.
Return the reversed string.
Q15. Wat area your skills
I am skilled in various programming languages and technologies including Java, Python, SQL, and web development frameworks.
Proficient in Java and Python programming languages
Experience with SQL and database management
Familiarity with web development frameworks such as Spring and Django
Knowledge of software development methodologies such as Agile and Scrum
Q16. What is Overloading and Overriding?
Overloading is having multiple methods in the same class with the same name but different parameters. Overriding is implementing a method in a subclass that is already defined in the parent class.
Overloading allows a class to have multiple methods with the same name but different parameters.
Overriding involves implementing a method in a subclass that is already defined in the parent class.
Overloading is resolved at compile time while overriding is resolved at runtime.
Example ...read more
Q17. make a pattern or fibonnaci series
A Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Start with two initial numbers, usually 0 and 1.
Add the two preceding numbers to get the next number in the series.
Repeat this process to generate the Fibonacci series.
Example: 0, 1, 1, 2, 3, 5, 8, 13, 21, ...
Q18. What is Abstraction?
Abstraction is the concept of hiding complex implementation details and showing only the necessary features of an object.
Abstraction allows us to focus on what an object does rather than how it does it
It helps in reducing complexity and improving efficiency
Examples of abstraction include interfaces in Java, where only method signatures are defined without implementation details
Q19. What is Inheritance?
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Derived class can override methods from the base class
Example: Class Car can inherit from class Vehicle
Q20. What is your expected CTC
My expected CTC is negotiable based on the responsibilities and growth opportunities offered by the role.
My expected CTC is based on industry standards and my experience level.
I am open to discussing the compensation package in detail during the interview process.
I am looking for a competitive salary package with additional benefits such as bonuses or incentives.
I am confident that my skills and experience justify a competitive compensation package.
Q21. What is oops basics
Oops basics refer to the fundamental concepts of Object-Oriented Programming such as classes, objects, inheritance, polymorphism, and encapsulation.
Oops basics include concepts like classes, which are blueprints for creating objects
Objects are instances of classes that encapsulate data and behavior
Inheritance allows a class to inherit properties and methods from another class
Polymorphism enables objects to be treated as instances of their parent class
Encapsulation involves bu...read more
More about working at Daffodil Software
Top HR Questions asked in Glencore Information Services
Interview Process at Glencore Information Services
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month