Extra Element | Daily Dose - 3 | Interview Questions | Geeks for Geeks | Tamil | code io

  Рет қаралды 4,550

code io - Tamil

code io - Tamil

3 жыл бұрын

Index Of an Extra Element
practice.geeksforgeeks.org/pr...
You are given a couple of arrays, you are expected return the missing element from the second array
Follow us in Instagram for more updates
/ code.i.o
#gfg #DailyDose #codeio

Пікірлер: 11
@kidswellstudy6610
@kidswellstudy6610 Жыл бұрын
K but you have to change your concept...your program will work only when the missing number is after the mid position...in the case of before mid it will be wrong
@suganeshrajaram5497
@suganeshrajaram5497 3 жыл бұрын
Nice✨
@codeio
@codeio 3 жыл бұрын
Thanks thanks 😊
@nithishkumark1644
@nithishkumark1644 3 жыл бұрын
Questions la bayangrama prepare panni irukkanga ✨✨
@codeio
@codeio 3 жыл бұрын
Thanks thanks 😅😅
@harikrish07
@harikrish07 8 ай бұрын
Solution 1: Time complexity:O(log N) def myfun(n,a,b): s=0 e=n-1 while s
@karthekeyanz
@karthekeyanz 2 жыл бұрын
// Time Complexity: O(N) + Space Complexity: O(1) > Brute Force Approach int findExtra(int a[], int b[], int n) { if (a == null || b == null || a.length == b.length) return -1; int minLen = a.length < b.length ? a.length : b.length; for (int i = 0; i < minLen; i++) { if (a[i] != b[i]) return i; } return a.length > b.length ? a.length - 1 : b.length - 1; }
@codeio
@codeio 2 жыл бұрын
Great Approach bro🤩🤩🤩
@karthekeyanz
@karthekeyanz 2 жыл бұрын
// Time Complexity: O(log N) + Space Complexity: O(1) > Binary Search Approach int findExtra(int a[], int b[], int n) { if (a == null || b == null || a.length == b.length) return -1; int start = 0, end = n - 1, extraElementIndex = 0; while (start
@codeio
@codeio 2 жыл бұрын
Awesome bro🤩🤩🤩
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 30 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 39 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 93 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 12 МЛН
Find the Element that Appears Once in a Sorted Array in O(logn)
13:22
Programming Tutorials
Рет қаралды 7 М.
LeetCode 442. Find All Duplicates in an Array (Solution Explained)
12:37
Friendship Day Paavangal | Parithabangal
16:10
Parithabangal
Рет қаралды 1,4 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 30 МЛН