Wittybrains Software Technologies
Foliage Technologies Interview Questions and Answers
Q1. Write a program to count vowels and consonants in string
A program to count the number of vowels and consonants in a given string.
Iterate through each character in the string
Check if the character is a vowel or consonant
Increment the respective count
Return the counts of vowels and consonants
Q2. What is the difference between truncate and drop command
Truncate removes all data from a table while drop deletes the table itself.
Truncate is faster than drop as it only removes data and not the table structure
Truncate cannot be rolled back while drop can be
Truncate resets the identity of the table while drop does not
Truncate can only be used on tables while drop can be used on tables, views, and indexes
Q3. Write a program to delete middle node from the linked list
Program to delete middle node from linked list
Traverse the list to find the middle node
Delete the middle node by updating pointers
Handle edge cases like even number of nodes
Q4. Write a program to reverse a string
Program to reverse a string
Use a loop to iterate through the string and append each character to a new string in reverse order
Alternatively, use built-in string functions like reverse() or slice()
Q5. Write a program to find the duplicate number in an array ranging 1 to 100, the input array contains exactly 100 items.
Program to find duplicate number in array of 1 to 100 items.
Iterate through array and use a set to keep track of seen numbers.
If a number is already in set, it is a duplicate.
Return the duplicate number found.
Q6. What is static keyword
Static keyword is used to define a class-level variable or method that can be accessed without creating an instance of the class.
Static variables are shared among all instances of a class
Static methods can be called without creating an object of the class
Static keyword can also be used to define a static block of code that gets executed only once when the class is loaded
Example: public static int count = 0; or public static void printMessage() {}
Q7. On which technology do you wish to work?
I wish to work on developing applications using artificial intelligence and machine learning technologies.
Passionate about developing intelligent systems that can learn and adapt
Interested in working on projects involving natural language processing, computer vision, and predictive analytics
Experience with tools and frameworks like TensorFlow, PyTorch, and scikit-learn
Q8. Explain oops concept (polymorphism)
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It can be achieved through method overloading or method overriding.
Example: A shape class can have different subclasses like circle, square, and triangle. Each subclass can have its own implementation of the draw method.
Polymorphism makes code more flexible and reusable.
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month