Part 1:

  1. Do you know what is White box testing?

White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of testing software that tests internal structures or workings of an application, as opposed to its functionality (i.e. black-box testing).

  1. Tell us what is Black box testing?

Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied to virtually every level of software testing: unit, integration, system and acceptance.

  1. What is Data mapping?

In computing and data management, data mapping is the process of creating data element mappings between two distinct data models. Data mapping is used as a first step for a wide variety of data integration tasks including: Data transformation or data mediation between a data source and a destination.

  1. Explain what is Data Integration?

► The process of combining data from different resources.
► The combined data is provided to the users with unified view.
► Information from different enterprise domains are integrated – known as Enterprise Information Integration.
► Useful for merging information from different technologies among enterprises.
► The sub areas of data integration are
1. Data Warehousing.
2. Data Migration.
3. Master Data Management.

  1. What is Business plan?

A business plan is a formal statement of business goals, reasons they are attainable, and plans for reaching them. It may also contain background information about the organization or team attempting to reach those goals.

  1. What are the benefits of data integration?

Following are the benefits of data integration:

► Makes reporting, monitoring, placing customer information across the enterprise flexible and
convenient.
► Data usage is efficient.
► Cost Effective.
► Risk adjusted profitability management as it allows accurate data extraction.
► Allows timely and reliable reporting, as data quality is the prime technology for business challenges.

  1. Tell me what is Risk Management?

The identification, analysis, assessment, control, and avoidance, minimization, or elimination of unacceptable risks. An organization may use risk assumption, risk avoidance, risk retention, risk transfer, or any other strategy (or combination of strategies) in proper management of future events.

  1. Describe about Physical Data Integration?

► Physical Data Integration is all about creating new system that replicates data from the source systems.
► This process is done to manage the data independent of the original system.
► Data Warehouse is the example of Physical Data Integration.
► The benefits of PDI include data version management, combination of data from various sources, like mainframes, flat files, databases.
► A separate system is needed for handling vast data volumes.

  1. What is Use Case and Test Case?

Use Case Testing is a functional black box testing technique that helps testers to identify test scenarios that exercise the whole system on each transaction basis from start to finish.

  1. Explain about Data Integration hierarchy?

The DI hierarchy is as follows:

► Project->JOB->WorkFlow->DataFlow.
► WorkFlow also has scripts.
► Source, Query, Target are under Data Flow and known as Transformations.
► Workflow, Dataflow, data, files or tables usage for certain number of times, is specified by usage count.
► Objects can be used more than once in Data Integration. These objects are known as reusable objects.

 

  1. What is SDLC methodologies?

To manage this level of complexity, a number of SDLC models or methodologies have been created, such as “waterfall”; “spiral”; “Agile software development”; “rapid prototyping”; “incremental”; and “synchronize and stabilize”. SDLC can be described along a spectrum of agile to iterative to sequential.

  1. What is UML modeling?

The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system.

  1. What is History Preserving?

► History Preserving is for providing new row in the target instead of updating the existing row.
► The columns are indicated for transforming the changes that are to be preserved.
► New rows are created when the value of certain column changes.
► Each of these rows is flagged as UPDATE.
► The UPDATE flag is applied for the input data set.

  1. What is shell script?

shell script is set of shell commands with some programming constructs e.g. if and for loop, which allow you to automate some repetitive task. For example, you can write shell script to daily cleanup of logs files, for backing up data for historical use and for other housekeeping jobs, releases and monitoring.

  1. What is the Open closed design principle?

Open closed is another principle from SOLID, which asserts that a system should be open for extension but close for modification. Which means if a new functionality is required in a stable system then your tried and tested code should not be touched and new functionality should be provided by adding new classes only.

  1. What is Hierarchy Flattening?

► Construction of parent/child relationships hierarchy is known as Hierarchy Flattening.
► A description of hierarchy in the vertical or horizontal format is produced.
► The hierarchy pattern includes Parent column, Child Column, Parent Attributes and Child Attributes.
► Hierarchy Flattening allows to understand the basic hierarchy of BI in a lucid manner.
► As the flattening is done in horizontal or vertical format, the sub elements are easily identified.

  1. What is a regular expression?

Regular expression is a way to perform pattern matching on text data. It’s very powerful tool to find something e.g. some character in a long string e.g. finding if a book contains some word or not. Almost all major programming language supports regular expression but Perl has been renowned for its enormous capability. Java also supports Perl like regular expression using java.util.regex package. You can use regular expression to check if a email is valid or not, if a phone number is valid, or if a zip code is valid, or even a SSN number is valid or not. One of the simplest example of regular expression is to check if a String is number or not.

  1. Explain about Pivot – Columns to Rows?

► Data Integrator produces a row in the output data set for every value in the designated pivot column.
► More than one pivot column can be set as per the need of application’s data integration.
► Pivot Sequence Column – Data Integrator increments a sequence number for every row created from a pivot column.
► Non-Pivot column – The columns that need to appear in the target.
► Pivot Set – A group of pivot columns, unique data field and header column.
► Data Field Column – It contains the pivot data along with pivot columns values.
► Header Column – Lists the name of the columns.

  1. What is Push Back from Business Users?

At many times the biggest issue with business users is their time availability. But, if you have a good Project Manager and Leadership, there should be collaboration between them and your business users and their management to ensure the time is available, this should be done well before the testing period begins. The Project Manager should also be able to define the length of time they would be required to spend testing. As a Business Analyst, I realize the business user’s time is very limited. Throughout the requirements lifecycle I try to provide mockups and/or prototypes of everything, get feedback, and make changes where necessary so that when the business users begin testing it isn’t so time consuming or the first time they are seeing the changes. Developing a Test Plan is required to set expectations at the time development begins.

  1. Explain about Data Integrator Metadata Reports?

► Browser-based analysis and reporting capabilities are provided by Metadata reports.

► The DI Metadata Reports are generated on metadata that associates with
1. Data Integration jobs.
2. Other BO applications those are associated with Data Integration.

► Three modules are provided by Metadata Reports. They are
1. Operational Dashboards.
2. Auto Documentation.
3. Impact and Lineage analysis.

 

  1. How do you find large files in UNIX e.g. more than 1GB?

You can easily find big files by using find command because it provides option to search files based upon there size. Use this if your file system is full and your Java process is crashing with no more space. This command will list all files which is more than 1GB. You can tweak the size easily e.g. to find all files with more than 100 MB just use +100M.

find . – type f -size +1G -print

  1. How SNMP Agent is associated with Data Integrator?

► Error events are communicated using applications are best supported by SNMP Agent.
► Errors are monitored better using SNMP.
► DI SNMP Agent need to be installed on any Job Server.
► Job servers information is recorded by DI SNMP Agent while running jobs.
► Network Management Software need to be configured for applications to communicate with DI SNMP Agent.
► The status of NMS applications will monitor the Data Integrator jobs.

  1. What is test-driven development?

Test driven is one of the popular development methodology in which tests are written before writing any function code. In fact, test drives the structure of your program. Purists never wrote a single line of application code without writing test for that. It greatly improve code quality and often attributed as a quality of rockstar developers.

  1. Explain what is Uniform Data Access Integration?

► UDAI places the data in the source systems.
► A set of views are defined for providing access the unified view to the clients / customers.
► Zero latency of data can be propagated from the source system.
► The generated consolidated data need not require separate storage space.
► Data history and version management is limited and applied only to the similar type of data.
► Accessing to the user data overloads on the source systems.

  1. Can you give a practical example of a recursive algorithm?

There are lots of places where recursive algorithm fits e.g. algorithm related to binary and linked list. Couple of examples of recursive algorithm is reversing String and calculating Fibonacci series. Other examples include reversing linked list, tree traversal, and quick sort algorithm.

  1. How Full Outer Join is implemented BODI? Explain with examples?

► Full Outer Join is implemented by using SQL Transformation and writing custom query.

► Following example describes SQL Transformation to implement Full Outer Join:
select emp.*, dept.deptname, dept.deptno dno, dept.location from scott.employee emp
FULL OUTER JOIN
scott.department dept on (emp.deptno = dept.deptno) ;

► Following example illustrates custom query to implement Full Outer Join:
1. Drag EMPLOYEE, DEPARTMENT tables as src.
2. Place the query transform for performing the Left Outer Join.
3. Place one more query transform for performing the Right Outer Join.
4. Merge and load them into the target.

  1. Describe how to adjust the performance of Data Integrator?

Following are the ways to perform this:

► Using array fetch size.
► Ordering the joins.
► Extracted data minimizing.
► Locale conversion minimization.
► Setting target-based options to optimize the performance.
► Improving throughput.
► Data type conversion minimization.

  1. Explain what is Traceability Matrix?

A traceability matrix is a document, usually in the form of a table, that correlates any two baselined documents that require a many-to-many relationship to determine the completeness of the relationship.

  1. What is the result of 1 XOR 1?

Answer is zero, because XOR returns 1 if two operands are distinct and zero if two operands are same, for example 0 XOR 0 is also zero, but 0 XOR 1 or 1 XOR 0 is always 1.

  1. What is System Design Document (SDD)?

A software design description (SDD) is a written description of a software product, that a software designer writes in order to give a software development team overall guidance to the architecture of the software project. An SDD usually accompanies an architecture diagram with pointers to detailed feature specifications of smaller pieces of the design. Practically, the description is required to coordinate a large team under a single vision, needs to be a stable reference, and outline all parts of the software and how they will work.

 

  1. How do we measure progress in Data Integration?

Look for the existence of the following items:-

► Generic Data Models
► An Enterprise Data Platform
► Identify the Data Sources
► Selection of a MDM Product
► Implementation of a Customer Master Index or appropriate alternative

  1. Write SQL query to find second highest salary in employee table?

This is one of the classic question from SQL interviews, event it’s quite old it is still interesting and has lots of follow-up you can use to check depth of candidate’s knowledge. You can find second highest salary by using correlated and non-correlated sub query. You can also use keyword’s like TOP or LIMIT if you are using SQL Server or MySQL, given Interviewer allows you. The simplest way to find 2nd highest salary is following :

SELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee)

This query first find maximum salary and then exclude that from list and again finds maximum salary. Obviously second time, it would be second highest salary.

  1. Explain the project you’ve worked on that you’re most proud of. What did you do that worked out particularly well?

This tells me a lot about what they know, what they value, what actual positions they’ve held on a team, and whether they actually think about what they’re doing.

  1. What is RUP, Rational Unified Process, implementation?

The Rational Unified Process (RUP) is an iterative software development process framework. RUP is not a single concrete prescriptive process, but rather an adaptable process framework, intended to be tailored by the development organizations and software project teams that will select the elements of the process that are appropriate for their needs. RUP is a specific implementation of the unified process.

  1. What are the factors that are addressed to integrate data?

Following are the data integration factors:

► Sub set of the available data should be optimal.
► Noise/distortion estimation levels because of sensory/processing conditions at the
time of data collection.
► Accuracy, spatial and spectral resolution of data.
► Data formats, storage and retrieval mechanisms.
► Efficiency of computation for integrating data sets to reach the goals.

  1. Explain about various caches available in Data Integrator?

► NO_CACHE – It is used for not caching values.
► PRE_LOAD_CACHE – Result column preloads and compares the column into the memory, prior to executing the lookup.
► PRE_LOAD_CACHE is used when the table can exactly fit in the memory space.
► DEMAND_LOAD_CACHE – Result column loads and compares the column into the memory when a function performs the execution.
► DEMAND_LOAD_CACHE is suitable while looking up the highly repetitive values with small subset of data.

  1. Is Data integration And ETL programming is same?

► No, Data Integration and ETL programming are different.
► Passing of data to different systems from other systems is known as data integration.
► It may integrate data within the same application.
► ETL, on the other hand, is to extract the data from different sources.
► The primary ETL tool job is to transform the data and loads into other objects or tables.

  1. What are the three major types of data integration jobs?

Following are the major data integration jobs:

► Transformation jobs – for preparing data
► Should be used when data must not be changed unless job completion of transforming data of a particular subject of interest
► Provisioning jobs – for transmission of data
► Should be used when data must not be changed unless job transformation when the data provisioning is large.
► Hybrid jobs – to perform both transformation and provisioning jobs.
► Data must be changed irrespective of success / failure.
► Should be implemented neither the transformation nor the provisioning requirements are large

  1. Explain the project you’ve worked on that you’re least proud of. What would you do differently?

I need people who can learn, and learning means making mistakes, recognizing that, and doing a better job next time.

  1. What are some important differences between a linked list and an array?

linked list and array are two of the most important data structure in programming world. Most significant difference between them is that array stores its element at contiguous location while linked list stores its data anywhere in memory. This gives linked list enormous flexibility to expand itself because memory is always scattered. It’s always possible that you wouldn’t be able to create an array to store 1M integers but can do by using linked list because space is available but not as contiguous chunk. All other differences are result of this fact. For example you can search an element in array with O(1) time if you know the index but searching will take O(n) time in linked list. For more differences see the detailed answer.

  1. If I have a Web application that I find is still running (via top/ps/whatever) but users are getting “connection refused” when trying to access it, how would I go about diagnosing the problem?

With the answer to that question, I get to hear about the interviewee’s thought process, favorite diagnostic tools, and biases, as well as whether they really know how to solve problems. Getting the “right” answer isn’t important, but it tells me about how the person thinks and how well they’ve familiarized themselves with the tools they use.

  1. How do you find if a number is power of two, without using arithmetic operator?

Assume its a question about using bitwise operator as soon as you hear restriction about not allowed to use arithmetic operator. If that restriction is not in place then you can easily check if a number is power of two by using modulus and division operator. By the using bitwise operator, there is a nice trick to do this. You can use following code to check if a number if power of two or not

public static boolean powerOfTwo(int x) {
return (x & (x – 1)) == 0;
}

x & (x-1) is a nice trick to convert right most bit to zero if it’s on, I learned from hackers delight book.

  1. What is the difference between iteration and recursion?

Iteration uses loop to perform same step again and again while recursion calls function itself to do the repetitive task. Many times recursion result in a clear and concise solution of complex problem e.g. tower of Hanoi, reversing a linked list or reversing a String itself. One drawback of recursion is depth, since recursion stores intermediate result in stack you can only go upto certain depth, after that your program will die with StackOverFlowError, this is why iteration is preferred over recursion in production code.

  1. Face to Face Systems Integration Analyst interview questions:

► When did you last update your Systems Integration Analyst education?
► Try to define processes and methodologies you use in your Systems Integration Analyst job.
► Specific example of a time when criticised your work.
► What do you do if you disagree with your boss?
► What kinds of decisions are most difficult for you?
► What is your greatest achievement outside of work?
► Describe how you have balanced your academic work with your extracurricular activities.

The interviewer is looking for work-related strengths. When answering these typical Systems Integration Analyst interview questions stay focussed on career goals and aspirations. Explain why you are interested in the job and ask questions about what you possibly dislike.

  1. Telephonic Systems Integration Analyst interview questions:

► What are top 3 skills for Systems Integration Analyst ?
► What are common risks for Systems Integration Analyst ? And how to face?
► What three character traits would your friends use to describe you?
► What’s your salary history?
► How do you evaluate your ability to handle conflict?
► What is your usual role in a team?
► Example of adaptation to changes and the difficulties.

  1. Basic Systems Integration Analyst interview questions:

► Situation where others disagreed with your ideas.
► What is the most difficult thing about working with you?
► What do you see yourself doing within the first days as Systems Integration Analyst ?
► What have you learned from your mistakes?
► How do you handle problems with customers?
► What do you like and dislike about Systems Integration Analyst job we are discussing?
► What motivates you to do a good job?

Focus on yourself and your talents, not other people’s flaws.
Say something about your interest and how it can help you on the job you are applying for.
Having a plan for your future demonstrates motivation and ambition, both of which are important qualities.

  1. General Systems Integration Analyst interview questions:

► Have you ever had difficulty getting others to accept your ideas?
► Why did you leave your last job.
► What are the key values of a Systems Integration Analyst ? How do you demonstrate these values?
► How will your greatest strength help you perform?
► What kinds of situations do you find most stressful?
► Why are you the best person for this Systems Integration Analyst job?
► How do you make your decisions in general?

  1. Systems Integration Analyst interview questions:

► Was there a person in your career who really made a difference?
► Try to define processes and methodologies you use in your Systems Integration Analyst job.
► How do you evaluate your ability to handle conflict?
► How do you feel about taking no for an answer?
► What was the most stressful situation you have facedas as Systems Integration Analyst ?
► What do you believe are your key strengths?
► Situation where others disagreed with your ideas.

Start with the present and tell why you are well qualified for the position. The best way to tackle these Systems Integration Analyst interview questions is to answer as honestly as possible.
Talk about desire to perform and be recognized for contributions.

  1. First Systems Integration Analyst interview questions:

► Do your skills match Systems Integration Analyst job or another job more closely?
► Tell about a problem that you solved in a unique or unusual way.
► What personal weakness has caused you the greatest difficulty in school or at work?
► What is your greatest fear?
► What do you do if you disagree with a co-worker?
► How do you react if you find that someone you work with does not like you?
► What is the difference between a good position and an excellent one?

  1. Explain about Manual Integration and Application Based Integration?

Manual Integration:
► Also known as Common User Interface.
► All the relevant information to access form the source system or web page interface is operated by the users.
► Unified view of the data does not exist.

Application Based Integration:
► ABI requires specific applications for implementing all the integration efforts.
► When the number of applications is limited, this approach is well manageable.

 

  1. What are the prime responsibilities of Data Integration Administrator?

► Scheduling and executing the batch jobs.
► Configuring, starting and stopping the real-time services
► Adapters configuration and managing them.
► Repository usage, Job Server configuration.
► Access Server configuration.
► Batch job publishing.
► Real-time services publishing through web services.

  1. What is Cascade and Drill Through? What is the difference between them?

Cascade:
► Cascade process involves taking values from various other prompts.
► The result is a single report.
► The result is used when a criteria is to be implemented.

Drill Through:
► Drill Through process is implemented when navigation from summary to detailed information.
► Drill Through has a parent and a child report.
► Data of another report can be seen based on the current details of data.

  1. Senior Software Engineer Integration Related Questions Part Three:

► What Source Control systems have you worked with?
► What is Continuous Integration? Have you used it and why is it important?
► Describe a software development life cycle that you’ve managed.
► How do you react to people criticizing your code/documents?
► Whose blogs or podcasts do you follow? Do you blog or podcast?
► Tell me about some of your hobby projects that you’ve written in your off time.
► What is the last programming book you read?
► Describe, in as much detail as you think is relevant, as deeply as you can, what happens when I type “cnn.com” into a browser and press “Go”.
► Describe the structure and contents of a design document, or a set of design documents, for a multi-tiered web application.
► What’s so great about <cool web technology of the day>?
► How can you stop your DBA from making off with a list of your users’ passwords?
► What do you do when you get stuck with a problem you can’t solve?
► If your database was under a lot of strain, what are the first few things you might consider to speed it up?
► What is SQL injection?
► What’s the difference between unit test and integration test?
► Tell me about 3 times you failed.
► What is Refactoring ? Have you used it and it is important? Name three common refactorings.
► You have two computers, and you want to get data from one to the other. How could you do it?
► Left to your own devices, what would you create?
► Given Time, Cost, Client satisfaction and Best Practices, how will you prioritize them for a project you are working on? Explain why.
► What’s the difference between a web server, web farm and web garden? How would your web application need to change for each?
► What value do daily builds, automated testing, and peer reviews add to a project? What disadvantages are there?
► What elements of OO design are most prone to abuse? How would you mitigate that?
► When do you know your code is ready for production?
► What’s YAGNI? Is this list of questions an example?
► Describe to me some bad code you’ve read or inherited lately.

  1. Senior Software Engineer Integration Related Questions Part Two:

► Discuss the differences between Mocks and Stubs/Fakes and where you might use them (answers aren’t that important here, just the discussion that would ensue).
► Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.
► Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.
► Concurrency
► ► What’s the difference between Locking and Lockless (Optimistic and Pessimistic) concurrency models?
► ► What kinds of problems can you hit with locking model? And a lockless model?
► ► What trade offs do you have for resource contention?
► ► How might a task-based model differ from a threaded model?
► ► What’s the difference between asynchrony and concurrency?
► Are you still writing code? Do you love it?
► You’ve just been assigned to a project in a new technology how would you get started?
► How does the addition of Service Orientation change systems? When is it appropriate to use?
► What do you do to stay abreast of the latest technologies and tools?
► What is the difference between “set” logic, and “procedural” logic. When would you use each one and why?

  1. Senior Software Engineer Integration Related Questions Part One:

► What is something substantive that you’ve done to improve as a developer in your career?
► Would you call yourself a craftsman (craftsperson) and what does that word mean to you?
► Implement a <basic data structure> using <some language> on <paper|whiteboard|notepad>.
► What is SOLID?
► Why is the Single Responsibility Principle important?
► What is Inversion of Control? How does that relate to dependency injection?
► How does a 3 tier application differ from a 2 tier one?
► Why are interfaces important?
► What is the Repository pattern? The Factory Pattern? Why are patterns important?
► What are some examples of anti-patterns?
► Who are the Gang of Four? Why should you care?
► How do the MVP, MVC, and MVVM patterns relate? When are they appropriate?
► Explain the concept of Separation of Concerns and it’s pros and cons.
► Name three primary attributes of object-oriented design. Describe what they mean and why they’re important.
► Describe a pattern that is NOT the Factory Pattern? How is it used and when?
► You have just been put in charge of a legacy code project with maintainability problems. What kind of things would you look to improve to get the project on a stable footing?
► Show me a portfolio of all the applications you worked on, and tell me how you contributed to design them.
► What are some alternate ways to store data other than a relational database? Why would you do that, and what are the trade-offs?

  1. How do you find a running Java process on UNIX?

You can use combination of ‘ps’ and ‘grep’ command to find any process running on UNIX machine. Suppose your Java process has a name or any text which you can use to match against just use following command.

ps -ef | grep “myJavaApp”

ps -e will list every process i.e. process from all user not just you and ps -f will give you full details including PID, which will be required if you want to investigate more or would like to kill this process using kill command.

  1. Explain what is unit testing?

Unit testing is way to test individual unit for their functionality instead of testing whole application. There are lot of tools to do the unit testing in different programming language e.g. in Java, you can use JUnit or TestNG to write unit tests. It is often run automatically during build process or in a continuous environment like Jenkins.

  1. Can you describe difference between correlated and non-correlated subquery?

In correlated sub-query, inner query depends upon outer query and executes for each row in outer query. While non-correlated sub query doesn’t depend upon outer query and can be executed independently. Due to this reason former is slow and later is fast. BTW, correlated subquery has some nice application, one of them is finding Nth highest salary in Employee table, as seen on previous SQL question as well.

  1. What is the difference between an interface and an abstract class?

This is the most classical question of all programming interviews. An interface is the purest form of abstraction with nothing concrete in place, while an abstract class is a combination of some abstraction and concrete things. The difference may vary depending upon language e.g. in Java you can extend multiple interface but you can only extend on abstract class. For a more comprehensive discussion see the detailed answer.

  1. What is a stateless system?

A stateless system is a system which doesn’t maintain any internal state. Such system will produce same output for same input at any point of time. It’s always easier to code and optimize a stateless system, so you should always strive for one if possible.

 

  1. What is difference between composition, aggregation and association?

Association means two objects are related to each other but can exists without each other, Composition is a form of association where one object is composed of multiple object, but they only exists together e.g. human body is composition of organs, individual organs cannot live they only useful in body. Aggregation is collection of object e.g. city is aggregation of citizens.

  1. What are couple of ways to resolve collision in hash table?

linear probing, double hashing, and chaining. In linear probing, if bucket is already occupied then function check next bucket linearly until it find an empty one, while in chaining, multiple elements are stored in same bucket location.

  1. What does the V in MVC stand for, and what does it signify?

V stands for View in MVC pattern. View is what user sees e.g. web pages. This is a very important design pattern of web development which is based upon segregation of concern, so that each area can be modified without impacting other areas. In Java world, there are lots of open source framework which provides implementation of MVC pattern e.g. Struts 2 and Spring MVC. By the way, M stands for model and C stands for controller. Modes are actual business objects e.g. User, Employee, Order while controller is used to route request to correct processor.

  1. What is time complexity of an algorithm?

Time complexity specify the ratio of time to the input. It shows how much time an algorithm will take to complete for a given number of input. It’s approximated valued but enough to give you an indication that how your algorithm will perform if number of input is increased from 10 to 10 million.

  1. What is the difference between an inner join and a left join in SQL?

In SQL, there are mainly two types of joins, inner join and outer join. Again outer joins can be two types right and left outer join. Main difference between inner join and left join is that in case of former only matching records from both tables are selected while in case of left join, all records from left table is selected in addition to matching records from both tables. Always watch out for queries which has “all” in it, they usually require left join e.g. write sql query to find all departments and number of employees on it. If you use inner join to solve this query, you will missed empty departments where no one works.

  1. What is difference between a binary tree and a binary search tree?

Binary search tree is an ordered binary tree, where value of all nodes in left tree are less than or equal to node and values of all nodes in right sub tree is greater than or equal to node (e.g. root). It’s an important data structure and can be used to represent a sorted structure.

  1. What is the relationship between threads and processes?

A process can have multiple threads but a thread always belongs to a single process. Two process cannot share memory space until they are purposefully doing inter process communication via shared memory but two threads from same process always share same memory.

  1. What is the Liskov substitution principle?

Liskov substitution principle is one of the five principle introduced by Uncle Bob as SOLID design principles. It’s the ‘L’ in SOLID. Liskov substitution principle asserts that every sub type should be able to work as proxy for parent type. For example, if a method except object of Parent class then it should work as expected if you pass an object of Child class. Any class which cannot stand in place of its parent violate LSP or Liskov substitution principle. This is actually a tough question to answer and if you does that you end up with creating a good impression on interviewers mind.

  1. Can you describe the difference between valid and well-formed XML?

A well-formed XML is the one which has root element and all tags are closed properly, attributes are defined properly, their value is also quoted properly. On other hand, a valid XML is the one which can be validated against a XSD file or schema. So it’s possible for a XML to be well-formed but not valid, because they contain tags which may not be allowed by their schema.

  1. How do you get the last digit of an integer?

By using modulus operator, number % 10 returns the last digit of the number, for example 2345%10 will return 5 and 567%10 will return 7. Similarly division operator can be used to get rid of last digit of a number e.g. 2345/10 will give 234 and 567/10 will return 56. This is an important technique to know and useful to solve problems like number palindrome or reversing numbers.

 

  1. What is the difference between a value type and a reference type?

A value type is more optimized type and always immutable e.g. primitive int, long, double and float in Java, while a reference type points to a object, which can be mutable or Immutable. You can also say that value type points to a value while reference type points to an object.

  1. What is difference between & and && operator?

& is a bitwise operator while && is a logical operator. One difference between & and && is that bitwise operator (&) can be applied to both integer and boolean but logical operator (&&) can only be applied to boolean variabes. When you do a & b then AND operator is applied to each bit of both integer number, while in case of of a && b , second argument may or may not be evaluated, that’s why it is also known as short circuit operator, at least in Java. I like this question and often asked it to junior or developer and college graduates.

  1. How much time it take to retrieve an element if stored in HashMap, Binary tree and a Linked list? how it change if you have millions of records?

In HashMap it takes O(1) time, in binary tree it takes O(logN) where N is number of nodes in tree and in linked list it takes O(n) time where n is number of element in list. Millions of records doesn’t affect the performance if data structure are working as expected e.g. HashMap has no or relatively less number of collision or binary tree is balanced. If that’s not the case then their performance degrades as number of records grows.

  1. Explain three different kinds of testing that might be performed on an application before it goes live?

unit testing, integration testing and smoke testing. Unit testing is used to test individual units to verify whether they are working as expected, integration testing is done to verify whether individually tested module can work together or not and smoke testing is a way to test whether most common functionality of software is working properly or not e.g. in a flight booking website, you should be able to book, cancel or change flights.

  1. What is difference between forking a process and spawning a thread?

When you fork a process, the new process will run same code as parent process but in different memory space, but when you spawn a new thread in existing process, it just creates another independent path of execution but share same memory space.

  1. Why would you ever want to create a mock object?

Mock object are very useful to test an individual unit in your Software, in fact stud and mocks are powerful tool for creating automated unit tests. Suppose you write a program to display currency conversion rates but you don’t have a URL to connect to, now if you want to test your code, you can use mock objects. In Java world, there are lot of frameworks which can create powerful mock objects for you e.g. Mockito and PowerMock.

  1. What is loose-coupling?

Loose coupling is a desirable quality of software, which allows one part of software to modify without affecting other part of software. For example in a loosely coupled software a change in UI layout should not affect the back-end class structure.

  1. What is a strongly typed programming language?

In a strongly typed language compiler ensure type correctness, for example you can not store number in String or vice-versa. Java is a strongly typed language, that’s why you have different data types e.g. int, float, String, char, boolean etc. You can only store compatible values in respective types. On the other hand, weakly typed language don’t enforce type checking at compile time and they tree values based upon context. Python and Perl are two popular example of weakly typed programming language, where you can store a numeric string in number type.

  1. What is the difference between a class and an object?

A class is a blue print on which objects are created. A class has code and behavior but an object has state and behavior. You cannot create an object without creating a class to represent its structure. Class is also used to map an object in memory, in Java, JVM does that for you.

  1. What is the difference between Overriding and Overloading?

Overriding is resolved at runtime while overloading is compile time. Also rules of overriding and overloading is different, for example in Java, method signature of overloaded method must be different than original method, but in case of overriding it must be exactly same as overriding method.

 

  1. What is revision/version control?

Version control are software which is used to store code and manage versions of codebase e.g. SVN, CVS, Git, Perforce and ClearCase. They are very effective while comparing code, reviewing code and creating build from previous stable version. All professional development use some sort of revision or version control tool, without it you cannot mange code effectively, especially if 20 developers are working in same code base at same time. Version control tool plays very important role to keep code base consistent and resolving code conflicts.

  1. Tell me what is SQL injection?

SQL injection is a security vulnerability which allows intruder to steal data from system. Any system which take input from user and create SQL query without validating or sanitizing that input is vulnerable to SQL injection. In such system, intruder can inject SQL code instead of data to retrieve more than expected data. There are many instances on which sensitive information e.g. user id, password and personal details are stolen by exploiting this vulnerability. In Java, you can avoid SQL injection by using Prepared statement.

  1. What is Immutable class mean?

A class is said to be Immutable if its state cannot be changed once created, for example String in Java is immutable. Once you create a String say “Java”, you cannot change its content. Any modification in this string e.g. converting into upper case, concatenating with another String will result in new object. Immutable object are very useful on concurrent programming because they can be shared between multiple threads without worrying about synchronization. In fact, whole model of functional programming is built on top of Immutable objects.

  1. What is a critical section?

critical section is the part of a code, which is very important and in multi-threading must be exclusively modified by any thread. Semaphore or mutex is used to protect critical section. In Java you can use synchronized keyword or ReentrantLock to protect a critical section.

  1. What is difference between DOM and SAX parser?

DOM parser is a in memory parser so it loads whole XML file in memory and create a DOM tree to parse. SAX parser is a event based parser, so it parses XML document based upon event received e.g. opening tag, closing tag, start of attribute or end of attribute. Because of their working methodology, DOM parser is not suitable for large XML file as they will take lot of space in memory and your process may ran out of memory, SAX is the one which should be used to parse large files. For small files, DOM is usually much faster than SAX.

  1. What is heap and stack in a process?

They are two separate areas of memory in same process. Talking about Java, stack is used to store primitive values and reference type to object but actual object is always created in heap. One critical difference between heap and stack is that, heap memory is shared by all threads but each thread has their own stack.

Part 2 :

  1. 1. Explain regular expression?

Regular expression is a way to perform pattern matching on text data. It’s very powerful tool to find something e.g. some character in a long string e.g. finding if a book contains some word or not. Almost all major programming language supports regular expression but Perl has been renowned for its enormous capability. Java also supports Perl like regular expression using java.util.regex package. You can use regular expression to check if a email is valid or not, if a phone number is valid, or if a zip code is valid, or even a SSN number is valid or not. One of the simplest example of regular expression is to check if a String is number or not.

  1. 2. Can you please explain the difference between linked list and an array?

linked list and array are two of the most important data structure in programming world. Most significant difference between them is that array stores its element at contiguous location while linked list stores its data anywhere in memory. This gives linked list enormous flexibility to expand itself because memory is always scattered. It’s always possible that you wouldn’t be able to create an array to store 1M integers but can do by using linked list because space is available but not as contiguous chunk. All other differences are result of this fact. For example you can search an element in array with O(1) time if you know the index but searching will take O(n) time in linked list. For more differences see the detailed answer.

  1. 3. Explain shell script?

shell script is set of shell commands with some programming constructs e.g. if and for loop, which allow you to automate some repetitive task. For example, you can write shell script to daily cleanup of logs files, for backing up data for historical use and for other housekeeping jobs, releases and monitoring.

  1. 4. How to find large files in UNIX e.g. more than 1GB?

You can easily find big files by using find command because it provides option to search files based upon there size. Use this if your file system is full and your Java process is crashing with no more space. This command will list all files which is more than 1GB. You can tweak the size easily e.g. to find all files with more than 100 MB just use +100M.

find . – type f -size +1G -print

  1. 5. Can you please explain the difference between correlated and non-correlated subquery?

In correlated sub-query, inner query depends upon outer query and executes for each row in outer query. While non-correlated sub query doesn’t depend upon outer query and can be executed independently. Due to this reason former is slow and later is fast. BTW, correlated subquery has some nice application, one of them is finding Nth highest salary in Employee table, as seen on previous SQL question as well.

  1. 6. How to find a running Java process on UNIX?

You can use combination of ‘ps’ and ‘grep’ command to find any process running on UNIX machine. Suppose your Java process has a name or any text which you can use to match against just use following command.

ps -ef | grep “myJavaApp”

ps -e will list every process i.e. process from all user not just you and ps -f will give you full details including PID, which will be required if you want to investigate more or would like to kill this process using kill command.

  1. 7. How to find if a number is power of two, without using arithmetic operator?

Assume its a question about using bitwise operator as soon as you hear restriction about not allowed to use arithmetic operator. If that restriction is not in place then you can easily check if a number is power of two by using modulus and division operator. By the using bitwise operator, there is a nice trick to do this. You can use following code to check if a number if power of two or no.

  1. 8. Write an SQL query to find second highest salary in employee table?

This is one of the classic question from SQL interviews, event it’s quite old it is still interesting and has lots of follow-up you can use to check depth of candidate’s knowledge. You can find second highest salary by using correlated and non-correlated sub query. You can also use keyword’s like TOP or LIMIT if you are using SQL Server or MySQL, given Interviewer allows you. The simplest way to find 2nd highest salary is following :

SELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee)

This query first find maximum salary and then exclude that from list and again finds maximum salary. Obviously second time, it would be second highest salary.

  1. 9. Explain stateless system?

A stateless system is a system which doesn’t maintain any internal state. Such system will produce same output for same input at any point of time. It’s always easier to code and optimize a stateless system, so you should always strive for one if possible.

  1. 10. Explain couple of ways to resolve collision in hash table?

Linear probing, double hashing, and chaining. In linear probing, if bucket is already occupied then function check next bucket linearly until it find an empty one, while in chaining, multiple elements are stored in same bucket location.

 

  1. 11. Explain about unit testing?

Unit testing is way to test individual unit for their functionality instead of testing whole application. There are lot of tools to do the unit testing in different programming language e.g. in Java, you can use JUnit or TestNG to write unit tests. It is often run automatically during build process or in a continuous environment like Jenkins.

  1. 12. Explain time complexity of an algorithm?

Time complexity specify the ratio of time to the input. It shows how much time an algorithm will take to complete for a given number of input. It’s approximated valued but enough to give you an indication that how your algorithm will perform if number of input is increased from 10 to 10 million.

  1. 13. Can you please explain the difference between binary tree and a binary search tree?

Binary search tree is an ordered binary tree, where value of all nodes in left tree are less than or equal to node and values of all nodes in right sub tree is greater than or equal to node (e.g. root). It’s an important data structure and can be used to represent a sorted structure.

  1. 14. Explain recursive algorithm?

There are lots of places where recursive algorithm fits e.g. algorithm related to binary and linked list. Couple of examples of recursive algorithm is reversing String and calculating Fibonacci series. Other examples include reversing linked list, tree traversal, and quick sort algorithm.

  1. 15. Explain Open closed design principle?

Open closed is another principle from SOLID, which asserts that a system should be open for extension but close for modification. Which means if a new functionality is required in a stable system then your tried and tested code should not be touched and new functionality should be provided by adding new classes only.

  1. 16. Explain Liskov substitution principle?

Liskov substitution principle is one of the five principle introduced by Uncle Bob as SOLID design principles. It’s the ‘L’ in SOLID. Liskov substitution principle asserts that every sub type should be able to work as proxy for parent type. For example, if a method except object of Parent class then it should work as expected if you pass an object of Child class. Any class which cannot stand in place of its parent violate LSP or Liskov substitution principle. This is actually a tough question to answer and if you does that you end up with creating a good impression on interviewers mind.

  1. 17. Explain test-driven development?

Test driven is one of the popular development methodology in which tests are written before writing any function code. In fact, test drives the structure of your program. Purists never wrote a single line of application code without writing test for that. It greatly improve code quality and often attributed as a quality of rockstar developers.

  1. 18. Explain the result of 1 XOR 1?

Answer is zero, because XOR returns 1 if two operands are distinct and zero if two operands are same, for example 0 XOR 0 is also zero, but 0 XOR 1 or 1 XOR 0 is always 1.

  1. 19. How to get the last digit of an integer?

By using modulus operator, number % 10 returns the last digit of the number, for example 2345%10 will return 5 and 567%10 will return 7. Similarly division operator can be used to get rid of last digit of a number e.g. 2345/10 will give 234 and 567/10 will return 56. This is an important technique to know and useful to solve problems like number palindrome or reversing numbers.

  1. 20. Can you please explain the difference between iteration and recursion?

Iteration uses loop to perform same step again and again while recursion calls function itself to do the repetitive task. Many times recursion result in a clear and concise solution of complex problem e.g. tower of Hanoi, reversing a linked list or reversing a String itself. One drawback of recursion is depth, since recursion stores intermediate result in stack you can only go upto certain depth, after that your program will die with StackOverFlowError, this is why iteration is preferred over recursion in production code.

 

  1. 21. Describe three different kinds of testing that might be performed on an application before it goes live?

Unit testing, integration testing and smoke testing. Unit testing is used to test individual units to verify whether they are working as expected, integration testing is done to verify whether individually tested module can work together or not and smoke testing is a way to test whether most common functionality of software is working properly or not e.g. in a flight booking website, you should be able to book, cancel or change flights.

  1. 22. Explain inner join and a left join in SQL?

In SQL, there are mainly two types of joins, inner join and outer join. Again outer joins can be two types right and left outer join. Main difference between inner join and left join is that in case of former only matching records from both tables are selected while in case of left join, all records from left table is selected in addition to matching records from both tables. Always watch out for queries which has “all” in it, they usually require left join e.g. write sql query to find all departments and number of employees on it. If you use inner join to solve this query, you will missed empty departments where no one works.

  1. 23. Can you please explain the difference between an interface and an abstract class?

This is the most classical question of all programming interviews. An interface is the purest form of abstraction with nothing concrete in place, while an abstract class is a combination of some abstraction and concrete things. The difference may vary depending upon language e.g. in Java you can extend multiple interface but you can only extend on abstract class. For a more comprehensive discussion see the detailed answer.

  1. 24. Can you please explain the difference between composition, aggregation and association?

Association means two objects are related to each other but can exists without each other, Composition is a form of association where one object is composed of multiple object, but they only exists together e.g. human body is composition of organs, individual organs cannot live they only useful in body. Aggregation is collection of object e.g. city is aggregation of citizens.

  1. 25. Explain loose-coupling?

Loose coupling is a desirable quality of software, which allows one part of software to modify without affecting other part of software. For example in a loosely coupled software a change in UI layout should not affect the back-end class structure.

  1. 26. Can you please explain the difference between class and an object?

A class is a blue print on which objects are created. A class has code and behavior but an object has state and behavior. You cannot create an object without creating a class to represent its structure. Class is also used to map an object in memory, in Java, JVM does that for you.

  1. 27. Explain V in MVC stand for, and what does it signify?

V stands for View in MVC pattern. View is what user sees e.g. web pages. This is a very important design pattern of web development which is based upon segregation of concern, so that each area can be modified without impacting other areas. In Java world, there are lots of open source framework which provides implementation of MVC pattern e.g. Struts 2 and Spring MVC. By the way, M stands for model and C stands for controller. Modes are actual business objects e.g. User, Employee, Order while controller is used to route request to correct processor.

  1. 28. Explain about SQL injection?

SQL injection is a security vulnerability which allows intruder to steal data from system. Any system which take input from user and create SQL query without validating or sanitizing that input is vulnerable to SQL injection. In such system, intruder can inject SQL code instead of data to retrieve more than expected data. There are many instances on which sensitive information e.g. user id, password and personal details are stolen by exploiting this vulnerability. In Java, you can avoid SQL injection by using Prepared statement.

  1. 29. Can you please explain the difference between valid and well-formed XML?

A well-formed XML is the one which has root element and all tags are closed properly, attributes are defined properly, their value is also quoted properly. On other hand, a valid XML is the one which can be validated against a XSD file or schema. So it’s possible for a XML to be well-formed but not valid, because they contain tags which may not be allowed by their schema.

  1. 30. Explain Immutable class mean?

A class is said to be Immutable if its state cannot be changed once created, for example String in Java is immutable. Once you create a String say “Java”, you cannot change its content. Any modification in this string e.g. converting into upper case, concatenating with another String will result in new object. Immutable object are very useful on concurrent programming because they can be shared between multiple threads without worrying about synchronization. In fact, whole model of functional programming is built on top of Immutable objects.

 

  1. 31. Explain create a mock object?

Mock object are very useful to test an individual unit in your Software, in fact stud and mocks are powerful tool for creating automated unit tests. Suppose you write a program to display currency conversion rates but you don’t have a URL to connect to, now if you want to test your code, you can use mock objects. In Java world, there are lot of frameworks which can create powerful mock objects for you e.g. Mockito and PowerMock.

  1. 32. Can you please explain the difference between threads and processes?

A process can have multiple threads but a thread always belongs to a single process. Two process cannot share memory space until they are purposefully doing inter process communication via shared memory but two threads from same process always share same memory.

  1. 33. Can you please explain the difference between DOM and SAX parser?

DOM parser is a in memory parser so it loads whole XML file in memory and create a DOM tree to parse. SAX parser is a event based parser, so it parses XML document based upon event received e.g. opening tag, closing tag, start of attribute or end of attribute. Because of their working methodology, DOM parser is not suitable for large XML file as they will take lot of space in memory and your process may ran out of memory, SAX is the one which should be used to parse large files. For small files, DOM is usually much faster than SAX.

  1. 34. Explain strongly typed programming language?

In a strongly typed language compiler ensure type correctness, for example you can not store number in String or vice-versa. Java is a strongly typed language, that’s why you have different data types e.g. int, float, String, char, boolean etc. You can only store compatible values in respective types. On the other hand, weakly typed language don’t enforce type checking at compile time and they tree values based upon context. Python and Perl are two popular example of weakly typed programming language, where you can store a numeric string in number type.

  1. 35. Explain revision/version control?

Version control are software which is used to store code and manage versions of codebase e.g. SVN, CVS, Git, Perforce and ClearCase. They are very effective while comparing code, reviewing code and creating build from previous stable version. All professional development use some sort of revision or version control tool, without it you cannot mange code effectively, especially if 20 developers are working in same code base at same time. Version control tool plays very important role to keep code base consistent and resolving code conflicts.

  1. 36. Explain heap and stack in a process?

They are two separate areas of memory in same process. Talking about Java, stack is used to store primitive values and reference type to object but actual object is always created in heap. One critical difference between heap and stack is that, heap memory is shared by all threads but each thread has their own stack.

  1. 37. Can you please explain the difference between value type and a reference type?

A value type is more optimized type and always immutable e.g. primitive int, long, double and float in Java, while a reference type points to a object, which can be mutable or Immutable. You can also say that value type points to a value while reference type points to an object.

  1. 38. Explain about critical section?

critical section is the part of a code, which is very important and in multi-threading must be exclusively modified by any thread. Semaphore or mutex is used to protect critical section. In Java you can use synchronized keyword or ReentrantLock to protect a critical section.

  1. 39. Can you please explain the difference between forking a process and spawning a thread?

When you fork a process, the new process will run same code as parent process but in different memory space, but when you spawn a new thread in existing process, it just creates another independent path of execution but share same memory space.

  1. 40. Can you please explain the difference between Overriding and Overloading?

Overriding is resolved at runtime while overloading is compile time. Also rules of overriding and overloading is different, for example in Java, method signature of overloaded method must be different than original method, but in case of overriding it must be exactly same as overriding method.

 

  1. 41. Tell me how much time it take to retrieve an element if stored in HashMap, Binary tree and a Linked list? how it change if you have millions of records?

In HashMap it takes O(1) time, in binary tree it takes O(logN) where N is number of nodes in tree and in linked list it takes O(n) time where n is number of element in list. Millions of records doesn’t affect the performance if data structure are working as expected e.g. HashMap has no or relatively less number of collision or binary tree is balanced. If that’s not the case then their performance degrades as number of records grows.

By bpci