[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Arrays Questions

Home > Technical Aptitude > Data Structures > Arrays > General Questions
NA
SHSTTON
31
Solv. Corr.
262
Solv. In. Corr.
293
Attempted
0 M:0 S
Avg. Time

21 / 76

Choose the correct option.

In special case, the time complexity of inserting/deleting elements at the end of dynamic array is __________


AO (1)

BO (n)

CO (n1/2)

DO (log n)

Answer: Option D

Explanation:

In general, the time complexity of inserting or deleting elements at the end of dynamic array is O (1). Elements are added at reserved space of dynamic array. If this reserved space is exceeded, then the physical size of the dynamic array is reallocated and every element is copied from original array. This will take O(n) time to add new element at the end of the array.

Workspace

NA
SHSTTON
132
Solv. Corr.
126
Solv. In. Corr.
258
Attempted
0 M:0 S
Avg. Time

22 / 76

Choose the correct option.

Which of the following arrays are used in the implementation of list data type in python?


AParallel arrays

BBit array

CDynamic arrays

DSparse arrays

Answer: Option C

Explanation:

Dynamic arrays are used in the implementation of list data type in python. Sparse arrays are used in the implementation of sparse matrix in Numpy module. All bit array operations are implemented in bitarray module.

Workspace

NA
SHSTTON
49
Solv. Corr.
231
Solv. In. Corr.
280
Attempted
0 M:0 S
Avg. Time

23 / 76

Choose the correct option.

What are parallel arrays?


AArrays allocated dynamically

BArrays of the same size

CArrays allocated one after the other

DArrays of the same number of elements

Answer: Option D

Explanation:

Different arrays can be of different data types but should contain same number of elements. Elements at corresponding index belong to a record.

Workspace

NA
SHSTTON
97
Solv. Corr.
164
Solv. In. Corr.
261
Attempted
0 M:0 S
Avg. Time

24 / 76

Choose the correct option.

What is a sparse array?


AAn array in which memory is allocated in run time

BData structure for representing arrays of records

CData structure that compactly stores bits

DAn array in which most of the elements have the same value

Answer: Option D

Explanation:

They are set to a default value, usually 0 or null.

Workspace

NA
SHSTTON
173
Solv. Corr.
100
Solv. In. Corr.
273
Attempted
0 M:0 S
Avg. Time

25 / 76

Choose the correct option.

When do you use a sparse array?


AWhen elements are sorted

BWhen there are unique elements in the array

CWhen the array has more occurrence of zero elements

DWhen the data type of elements differ

Answer: Option C

Explanation:

It need not necessarily be zero, it could be any default value, usually zero or null.

Workspace

NA
SHSTTON
138
Solv. Corr.
251
Solv. In. Corr.
389
Attempted
0 M:11 S
Avg. Time

26 / 76

Choose the correct option.

What is the difference between a normal(naive) array and a sparse array?


AA naive array is more efficient

BSparse array can hold more elements than a normal array

CSparse array is memory efficient

DSparse array is dynamic

Answer: Option C

Explanation:

A naive implementation allocates space for the entire size of the array, whereas a sparse array(linked list implementation) allocates space only for the non-default values.

Workspace

NA
SHSTTON
94
Solv. Corr.
112
Solv. In. Corr.
206
Attempted
0 M:0 S
Avg. Time

27 / 76

Choose the correct option.

Which of the following is a disadvantage of parallel array over the traditional arrays?


AInsertion and Deletion becomes tedious

BWhen a language does not support records, parallel arrays can be used

CIncreased locality of reference

DIdeal cache behaviour

Answer: Option A

Explanation:

Insertion and deletion of elements require to move every element from their initial positions. This will become tedious. For Record collection, locality of reference and Ideal Cache behaviour we can use parallel arrays.

Workspace

NA
SHSTTON
143
Solv. Corr.
53
Solv. In. Corr.
196
Attempted
0 M:0 S
Avg. Time

28 / 76

Choose the correct option.

Which of the following is an advantage of parallel arrays?


AIncreased Locality of Reference

BPoor locality of reference for non-sequential access

CVery little direct language support

DExpensive to shrink or grow

Answer: Option A

Explanation:

Elements in the parallel array are accessed sequentially as one arrays holds the keys whereas other holds the values. This sequential access generally improves Locality of Reference. It is an advantage.

Workspace

NA
SHSTTON
79
Solv. Corr.
152
Solv. In. Corr.
231
Attempted
0 M:7 S
Avg. Time

29 / 76

Choose the correct option.

Which of the following is not an application of sorted array?


AHash Tables

BCommercial computing

CPriority Scheduling

DDiscrete Mathematics

Answer: Option A

Explanation:

Sorted arrays have widespread applications as all commercial computing involves large data which is very useful if it is sorted. It makes best use of locality of reference and data cache. Linked lists are used in Hash Tables not arrays.

Workspace

NA
SHSTTON
37
Solv. Corr.
74
Solv. In. Corr.
111
Attempted
5 M:56 S
Avg. Time

30 / 76

Choose the code which performs the store operation in a sparse array.(Linked list implementation)
<b>I.</b> public void store(int index, Object val)
{
    List cur = this;
    List prev = null;
 
    List node = new List(index);
    node.val = val;
 
    while (cur != null && prev.index < index)
    {
        cur = cur.next;
        prev = cur;
    }
 
    if (cur == null)
    {
        prev.next = node;
    } 
    else
    {
        if (cur.index == index)
    {
        System.out.println("DUPLICATE");
        return;
    }
    prev.next = cur;
    node.next = node;
    }
    return;
}

<b>II.</b>  public void store(int index, Object val)
{
       List cur = this;
       List prev = null;
 
       List node = new List(index);
       node.val = val;
 
       while (cur != null && cur.index < index)
       {
           prev = cur;
           cur = cur.next;
       }
 
       if (cur == null)
       {
           prev.next = node;
       } else
       {
           if (cur.index == index)
           {
               System.out.println("DUPLICATE");
               return;
           }
           prev.next = node;
           node.next = cur;
       }
       return;
}

<b>III.</b> public void store(int index, Object val)
{
        List cur = this;
        List prev = null;
 
        List node = new List(index);
        node.val = val;
 
        while (prev != null && prev.index < index)
        {
            prev = cur;
            cur = cur.next;
        }
 
        if (cur == null)
        {
            prev.next = node;
        } else
        {
            if (cur.index == index)
            {
                System.out.println("DUPLICATE");
                return;
            }
            prev.next = node;
            node.next = cur;
        }
        return;
}

<b>IV.</b> public void store(int index, Object val)
{
        List cur = this;
        List prev = null;
 
        List node = new List(index);
        node.val = val;
 
        while (cur != null && cur.index < index)
        {
   cur = cur.next;
            prev = cur;
        }
 
        if (cur == null)
        {
            prev.next = node;
        } else
        {
            if (cur.index == index)
            {
                System.out.println("DUPLICATE");
                return;
            }
            prev.next = node;
            node.next = cur;
        }
        return;
}

AI

BII

CIII

DIV

Answer: Option B

Explanation:

Create a new node and traverse through the list until you reach the correct position, check for duplicate and nullity of the list and then insert the node.

Workspace

Data Structures Arrays Questions and Answers pdf

At Data Structures topic Arrays page No: 3 you will find list of 10 practice questions, tips/trick and shortcut to solve questions, solved questions, quiz, and download option to download the whole question along with solution as pdf format for offline practice. You can practice all the listed Data Structures Arrays topic questions offline too, by downloading the MCQs practice question of Arrays with detail solution, with formula/Tips & Tricks, with Solved examples and with top-rated users answers, which will give you best answer ascross webs. It is one of the perfect Arrays e-book pdf covering all types of questions in detail. These Data Structures test with answers pdf cover all types of question asked in IIFT, XAT, SNAP, GRE, GMAT, NMAT, CMAT, MAT or for IT companies written exam like Wipro, HCL, Infosys, Accenture, Government exams, IBPS Exams etc. There are multiple formats to download your online free Data Structures Arrays e-book, like fully solved, unsolved questions with Answers sheet. Even you can customize your ebook format by adjusting the given options in the download section to make it your one of the best Data Structures topic-based ebook. It is recommended to bookmark this page Data Structures Arrays for your preparation. Most of the students and fresher candidates finding it hard to clear the Data Structures section in exams. Here Given Arrays practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Arrays. Each test has all the basics questions to advanced questions with answer and explanation for your clear understanding, you can download the test result as pdf for further reference.

At Data Structures topic Arrays, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Arrays, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Arrays MCQs practice question, and one after solving all the question of the respective level, you can refer back your Arrays quiz result any time or you can download it as pdf for reference.

Data Structures Arrays Customize Online Mock Test

This is own type of mock test, where At this Data Structures Arrays MCQs mock test section, you will able to attempt only the questions related to Arrays, in that question will be a different level, important, and all the questions will be part of some of the mock tests across Q4interview FREE Mock test. You need to choose the topic as Arrays, and click on Double click to generate your customize mock test. While attempting the mock test you need to choose any of the one options out of given option. It is recommended to go through the direction given along with each question, as these questions will be randomly and so that same direction will not be applicable across the entire test. Once you submit your mock test, the result will be generated for Arrays Customize mock test, where your performance point points will be highlighted. Q4interview analysis every single point which helps you to improve your topic understanding and help you to know your type of mistakes and way to improve Arrays questions, by providing the same type of practice questions from practice exercise. The best part of this Arrays, all these mock tests listed here are free and you can take as Many time, as many you want. When you continue to give Arrays Customize Online Mock Test here regularly, then you will understand how much you have developed your accuracy on a topic, after that you will be able to decide how much attention you need to focus on. Your continued practice will increase your confidence, speed and thinking ability intensely, the Arrays Customize topic on which you will practice more will beneficial for you in future during campus placement.Arrays Mock Tests

Data Structures Arrays Quiz Online Test

The details of the Data Structures Arrays quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about Data Structures Arrays that you see and keep them in mind while answering questions.

Data Structures Arrays MCQs Practice Questions with Answer

On this Arrays section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve Arrays Question Quickly. It contains all the Data Structures topic Arrays questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on Data Structures topic and Arrays topic based quiz.

Data Structures Arrays solved examples question

Clarity of concepts is a must if you want to master the skill of solving Data Structures problems. This page contains sample Data Structures Arrays questions and answers for freshers and competitive exams. Arrays Questions with the detailed description, the explanation will help you to master the topic. Here solved examples with detailed answer description, explanations are given and it would be easy to understand. How to solve qArraysData Structures? Here are some examples solved with the Common Rules/tricks/tips of Data Structures. Enhance your chance to score maximum marks in Data Structures sections through. Error Spotting Grammar Questions Online Test for Free. Fully solved Sentence Formation MCQs questions with detailed answer description. Data Structures is an important topic for any exams but most aspirants find it difficult. You need to learn various tricks tips, rules, etc to solve quickly. At this page, you will find frequently asked Arrays questions or problems with solutions, shortcuts, formulas for all-important competitive exams like IT companies exams, interviews. It is always a best practice to go through the example and understand the types of question and way to solve it, so let's do some examples to calculate efficiency, read through all the given here solved examples. You can post your solution, tips, trick and shortcut if you have any in respect to questions.

You can get here fully solved Arrays examples with a detailed answer and description. You can solve Arrays problems with solutions, the questions by companies wise by filtering the questions, additionally, you can check what type of questions are being asked in IT companies Written Round from Arrays. Arrays became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Arrays Examples, Arrays sample questions. You can Evaluate your level of preparation in Arrays by Taking the Q4Interivew Arrays Online Mock Test based on most important questions. All the Arrays practice questions given here along with answers and explanations are absolutely free, you can take any number of time any mock Test.

Why Data Structures Arrays?

In this practice section, you can practice Data Structures Questions based on "Arrays" and improve your skills in order to face the interview, competitive examination, IT companies Written exam, and various other entrance tests (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get Data Structures Arrays questions and answers with explanation?

Q4Interview provides you lots of fully solved Data Structures (Arrays) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. You can download Data Structures Arrays quiz questions with answers as PDF files and eBooks.

Where can I get Data Structures Arrays Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type Data Structures Arrays questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.