0% found this document useful (0 votes)
1 views1 page

Arrays & Strings

Uploaded by

vishalyadavyd786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Arrays & Strings

Uploaded by

vishalyadavyd786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DSA Topic: Arrays & Strings

**Arrays**

- Definition: A collection of elements stored at contiguous memory locations.

- Basic operations: Traversal, Insertion, Deletion, Searching, Sorting.

- Time complexities: Access O(1), Search O(n), Insertion/Deletion O(n).

- Sample code (Python):

```python

arr = [1, 2, 3]

arr.append(4)

arr.remove(2)

print(arr)

```

**Strings**

- Immutable sequences of characters.

- Common operations: Concatenation, Substring, Search, Replace.

- Interview Tips: Know string reversal, palindrome, anagram checks.

You might also like