D-329 First and last occurrences of x | 2 ways | BinarySearch |JAVA|C++| GFG POTD |English |22 Sept

Опубликовано: 19 Октябрь 2024
на канале: Akshay Anil
353
15

2 methods -
TC: O(N), SC: O(1) - Linear Traversal - Brute
TC: O(logN), SC: O(1) - Binary Search - Optimal
DSA REPOSITORY: https://github.com/AkshayAnil1080/DSA

This problem is the same as we have covered in D296
Problem Link - https://practice.geeksforgeeks.org/pr...
Source Code - https://github.com/AkshayAnil1080/DSA...

GFG Problem Link:https://practice.geeksforgeeks.org/pr...
Source Code JAVA/C++ : https://github.com/AkshayAnil1080/DSA...

Prerequisite:
Time Complexity - Logic of 10^8- Find algo to any problem
   • Trick  the TLE | How to read Constrai...  

GFG POTD Playlist -    • DAY 1 | Filling Bucket | GFG POTD 22 ...  

Number Theory playlist -    • 204. Count Primes - (Algorithm Explai...  

Arrays -    • Reverse a String | Ep-01  

LinkedList -    • Reverse a Linked List - LeetCode #206  

Strings -    • Day 300 - Multiply two strings | Math...  

Bitwise -    • Non Repeating Numbers|  [Bitwise] | G...  

Stacks -   • DAY - 280 Reverse a Stack | JAVA| C++...  

Heaps -    • How to Build Heap and Heapify | JAVA ...  

Recusrion -    • Lec-1 What is Recursion ? | JAVA | DSA  

Map -    • Non Repeating Character - MAP | GFG P...  

Graphs Playlist Link -    • Course Schedule II (Topological Sorti...  

Binary Trees Playlist -    • What is a  Binary Tree ?  

DP playlist -   • What is Dynamic Programming ,  Memoiz...  

GitHub: https://github.com/AkshayAnil1080

Hello everyone, I am Akshay and I appreciate you stopping by my channel. I have made this channel to help all ready to learn, grow, and do something big in the field of Tech.
It's a free Youtube channel dedicated to students developing problem-solving skills.

Let's connect on
Instagram
  / itzz_aksh_yay  
  / dsa_with_akshay  
LinkedIn
  / akshay-a-26672a172  
Linktree: https://linktr.ee/aksh_yay

Happy Coding 🤝
.
.
.
.

#AkshayAnil #dsa #dsa_with_akshay #programming #gfg #gfgpotd #problemsolving #coding #softwareengineer #faang #amazon #microsoft #competitiveprogramming #dsasheet #interviewpreparation