Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

ARRAYS

This is the one of most important data structure that is generally easy to understand but algorithms and concepts of this topic can be very tricky and it is asked in almost every tech company. Algorithms such as Binary Search, Sorting, Maximum Subarrays, and Searching are must to do in order to get a good grasp of this topic.

Introduction to Arrays

Introduction

Memory Creation: In C++, memory creation involves allocating memory space for variables, including arrays. There are two main ways to create memory in C++: ...

Read more

Applications of Array

Programming and implementation of other data structures

Arrays have numerous applications in programming due to their simplicity and efficiency. Here are some of them:

1. Storage and Retrieval: Arrays are often used to store collections of dat...

Read more

Advantages and Disadvantages of Array

Arrays offer several advantages and disadvantages compared to other data structures. Below are the advantages and disadvantages.

Advantages of Arrays:

1. Random Access: Arrays provide constant-time access to elements based on their index. This ...

Read more

Array Sorting

Bubble Sort

The bubble sort algorithm is a simple comparison-based sorting algorithm. It repeatedly steps through the list, compares adjacent elements, and swaps them if they are in...

Read more

Extra Sorting

Sort Array in Wave Format

This sorts an array in an ascending order through iterating from first to second last element. By sorting the array in ascending order first ...

Read more

Linear Search

In this searching algorithm, each element is sequentially searched until a match is found or the entire array has been traversed. It is applicable to both sorted and unsorted arrays.

Algorithm

1. Compare target element with each element of arra...

Read more

Binary Search

A Brief Introduction to Binary Search

Binary search is used for searching in sorted arrays or lists only. It follows a divide-and-conquer approach by repeatedly di...

Read more

Quick Search

Quick search, also known as QuickSelect, is a selection algorithm used to find the k-th smallest element in an unsorted array.

Worst Case Time Complexity:

- In the worst case, QuickSelect has a time complexity of O(n^2), where n is the num...

Read more

Library

WEB DEVELOPMENT

FAANG QUESTIONS