Part5DataStructure

  Рет қаралды 41,612

Brototype Malayalam

Brototype Malayalam

Күн бұрын

Пікірлер: 210
@LearnCodeDesign
@LearnCodeDesign 3 жыл бұрын
def moveNumber(nums, target): pos = 0 for num in nums: if num != target: nums[pos] = num pos += 1 for i in range(pos, len(nums)): nums[i] = target Time : O(n), Space O(1), In place movement by maintaining the relative order of elements.
@sheikhkevinbnujameskev7704
@sheikhkevinbnujameskev7704 3 жыл бұрын
arr = [6,1,6,8,10,4,15,6,3,4,6] def ea(array,t): for i in range(0,len(array)): if array[i]==t: array.append(array[i]) array.pop(i) print(array) ea(arr,6) Time complexity == O(n) Space complexity ==O(1)
@sankaranarayananp8407
@sankaranarayananp8407 3 жыл бұрын
In C Programming, #include #include void main() { int size, i, j, target; int* arr; printf("Enter the size of an array: "); scanf("%d",&size); arr = (int*)calloc(size, sizeof(int)); if(arr==NULL) { printf("Out of memory !!"); } else { printf("Enter the elements: "); for(i=0; i
@rishikesh2757
@rishikesh2757 3 жыл бұрын
Shaheen nice programming + comedy aanallo.njan parayenda kaaryamilla but full crossroads team poli aanu.
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
thanks man ♥️
@faisalerakottil675
@faisalerakottil675 7 ай бұрын
answer of the last Question in Dart List moveFivesToEnd(List arr) { List nonFives = []; List fives = []; for (int element in arr) { if (element == 5) { fives.add(element); } else { nonFives.add(element); } } return nonFives.followedBy(fives).toList(); } void main() { List arr = [1, 2, 5, 3, 5, 2, 6, 5, 7, 8, 5]; List modifiedArr = moveFivesToEnd(arr); print(modifiedArr); }
@abilashtitus8248
@abilashtitus8248 6 ай бұрын
Hey Bro.
@yadupk4595
@yadupk4595 3 жыл бұрын
ഇത്രേം നാടൻ ഭാഷയിൽ വേറെ എവിടെ ക്ലാസ് കിട്ടും
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
അതില്ല! അതാണ് crossroads pever 🔥
@fathimamp5477
@fathimamp5477 26 күн бұрын
Chirichond enjoy cheyth padikkan pattiya oreyoru channel😊❤
@mohammedfahidm5858
@mohammedfahidm5858 3 жыл бұрын
Oru Doubt... num.contain() oru function alle... so inside that function oru comparison tanne lle nadakunne.. Apo aa function matram O(n) varulle?. Total program nn O(n^2) ??
@jelanmathewjames2579
@jelanmathewjames2579 2 жыл бұрын
solution with O(n)T and O(1)S using j and i variables. for loop decrement # function def arrayproblems(array,target): # i and j variables having position of last element i = j = len(array)-1 for i in range(i,-1,-1): # checking all elements if array[i]== target: array[i],array[j] = array[j],array[i] j -= 1 array = [1,2,3,1,2,4,2,3,5,3,2,5,3,5,3,1,6,4,5,4,3,1,6,5,4,3,1,5] target = 3 print("Given Array:",array) print("Given Target",target) arrayproblems(array,target) print("Answer",array)
@hasanulbanna7124
@hasanulbanna7124 2 жыл бұрын
def rearrange(ls,target): for i in range (0,len(ls)): if ls[i]==target: ls.append(ls[i]) del ls[i] return ls Space complexity = O(1) Time complexity = O(n)
@Raihan-Rahoof
@Raihan-Rahoof Жыл бұрын
can we use more inbuilt function
@amaljs4168
@amaljs4168 2 жыл бұрын
def arrange(array,number): j=len(array)-1 if array[j]==number: j-=1 for i in range(0,len(array)-1): if j>=i: if array[i]==number: array[j],array[i]=array[i],array[j] j-=1 return print(array) arrange([1,3,5,2,5,1,8,14,1],1) Answer : [14, 3, 5, 2, 5, 8, 1, 1, 1]
@shamseerpv8647
@shamseerpv8647 3 жыл бұрын
. Android studio , fuleter ഇവ windows 10 ആണോ ? Ubandu വില്യാണോ ? ഉപയോഗിക്കാൻ നല്ലത്
@arunthomas5989
@arunthomas5989 3 жыл бұрын
sir ee Hackingum codingum tamelulla bendam enta
@rishikesh2757
@rishikesh2757 3 жыл бұрын
coders are not hackers but hackers are probably coders too
@vinayakvishnu8953
@vinayakvishnu8953 5 ай бұрын
Thanks❤
@raishadn1036
@raishadn1036 2 жыл бұрын
Array yilee elements print cheyyaan for loop use cheyyunnund... But athinte O(n) enthaa edukkaathath? Pls reply
@raishadn1036
@raishadn1036 2 жыл бұрын
Aarenkiklm reply tharoo?
@mohammedsafvan6344
@mohammedsafvan6344 2 жыл бұрын
@@raishadn1036 Aaa bhagham java specific aaanennu thonunnu python il okke nerittu array print cheyyam
@vishnuprasad8702
@vishnuprasad8702 3 жыл бұрын
Node solution First Method => const twoNumberSum = (array, target) => { for (let i = 0; i < array.length - 1; i++) { for (let j = i + 1; j < array.length; j++) { if (array[i] + array[j] === target) return [array[i], array[j]]; } } return null; } const array = [6, 5, 4, 3, 9, 8, 0]; const target = 10; console.log(twoNumberSum(array, target)); Second Method=> const twoNumberSum = (array, target) => { let set = new Set(); for (let i = 0; i < array.length; i++) { let number = array[i]; let match = target - number; if (set.has(match)) { return [number, match]; } else { set.add(number); } } return null; } const array = [6, 5, 4, 3, 9, 8, 0]; const target = 10; console.log(twoNumberSum(array, target));
@muhammednavas-yd1ut
@muhammednavas-yd1ut 2 жыл бұрын
thanks bro
@udaysankar9411
@udaysankar9411 3 жыл бұрын
' déjà vu ' പറ്റി കേട്ടിട്ടുണ്ടോ ഈ ക്ലാസ് കണ്ടപ്പോള്‍ എനിക്ക് അത് തോന്നി
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
ആഹാ! dejavu തോന്നിക്കാൻ ഇത് മുന്നേ നീ പഠിച്ചോണ്ടാവും 😄
@krayshellinc2015
@krayshellinc2015 3 жыл бұрын
A glitch in the matrix or someone else is trying to communicate with you from another universe
@aneesh.augustine
@aneesh.augustine Жыл бұрын
java script time and space complexity o(1) let arr = [6, 1, 6, 8, 10, 4, 15, 6, 3, 9, 6]; let target = 6; console.log(arr); function sort(arr, target) { arrLength = arr.length; for (let i = 0; i < arrLength; i++) { if (arr[i] == target) { let val = arr[i]; arr.push(val); arr.splice(i, 1); } } return arr; } console.log(sort(arr, target));
@rebinnajeeb9293
@rebinnajeeb9293 Жыл бұрын
100k challenge padichett ee series padichaal eluppano?I mean python il full cheyyunnathano nallath or?...
@BrototypeMalayalam
@BrototypeMalayalam Жыл бұрын
ithil cheyyunath pole cheytholu
@khaderafsal
@khaderafsal 2 жыл бұрын
public static void swap(int[] array, int target){ for(int i=0;ii;j--){ if(array[j]!=target ){ int temp=array[i]; array[i]=array[j]; array[j]=temp; } } } } for(int i=0;i< array.length;i++){ System.out.println(array[i]); } } }
@s4studios379
@s4studios379 3 жыл бұрын
Array out of bound exception ennu kaanikunnu result ethiley frst twoNumberSum problem cheympol.
@s4studios379
@s4studios379 3 жыл бұрын
Sorry bro error onnumillaa nte oru mistake arinnuu epol issue onnmillaaa
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
good
@JR7yt.
@JR7yt. 3 ай бұрын
function same(arr, t) { let normalV = []; let sameV = []; let newArr; for (let i = 0; i < arr.length; i++) { if (arr[i] === t) { sameV.push(arr[i]); } else { normalV.push(arr[i]); } } return (newArr = [...normalV, ...sameV]); } const result = same([3, 5, 3, 4, 7, 3, 9, 3], 3); console.log(result); The time complexity and space complexity are O(n).
@ABINBIJU
@ABINBIJU 6 ай бұрын
for (int i=0;i
@adarshkm8503
@adarshkm8503 3 жыл бұрын
ithinte pseudo code paranju tharuo?
@adhilfouzi5511
@adhilfouzi5511 Жыл бұрын
Dart solution List twoNumberSum(List array, int target) { array.toSet(); for (int i = 0; i < array.length; i++) { int num = array[i]; int match = target - num; if (array.contains(match)) { return [num, match]; } else { array.add(num); } } return []; } void main() { List array = [6, 5, 7, 9, 4, 0, 2]; int target = 10; List result = twoNumberSum(array, target); for (int i = 0; i < result.length; i++) { print(result[i]); } }
@vajidnalakath8060
@vajidnalakath8060 2 жыл бұрын
public class Sample { public static int[] SwaptoEnd(int array[],int target) { for(int j=array.length-1;j>0;j--) { if(array[j]!=target) { for(int i=0;i
@jijomrrover3785
@jijomrrover3785 Жыл бұрын
let arr=[2,3,5,6,4,6,3,8]; let target=6; function fun(target,arr){ let limit=arr.length-1 for(let i=0;i
@theophinjohnson8234
@theophinjohnson8234 3 жыл бұрын
Time = O(n)T space = O(1)S public class ArrayProblems { public static int[] moveValueToEnd(int [] array) { int length = array.length; int i=0,temp,j=length-1; while(i
@fathimasherin2095
@fathimasherin2095 5 ай бұрын
using dart class Solution { List moveSix(List nums, int target) { int n=nums.length-1; int temp=0; int i=0; while(i
@agpskalaparipaadeex7077
@agpskalaparipaadeex7077 Жыл бұрын
public static int[] sol(int[] arr,int target){ int i=0,j=arr.length-1; while(i
@orzogaming4285
@orzogaming4285 3 жыл бұрын
From brirtish academy Koyilandy 😅💥🔥 powli presentation 🔥😍
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
thankyou thankyou ♥️
@fsocietynauran8605
@fsocietynauran8605 3 жыл бұрын
Day 2, njan eddaum ethittunde. Pinne aaa introill paranja sambavam indallo ( engakke eth inn anne, njangakk eth nale anne ) Ath njan oru 4 pravisham rewind cheyth nokki enittum manasilayella😂
@MrAmeer27
@MrAmeer27 3 жыл бұрын
Nale nnu parayum innale akumo?
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
illa illa 🤣🤣🤣
@avishithpm1712
@avishithpm1712 3 жыл бұрын
ipo oru kariyam manasill aayii ee pani athra eluppam alla.....10 manikk kanda vido ya ithu vare answer complete chiyan pattiyillaa..python ill simple aayii appendum remove vum vechu chiyaam bt..using i and j in for loop is tricky...
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
engane cheythalum preshanilla, answer kittyal comment cheyye ✌🏼
@parthivk9075
@parthivk9075 3 жыл бұрын
target - arrayil illa first number cheythal kittuna number aa arayil indo check cheytha pore . For example 10-6 =4 appo aa arayil enji 4 indo nokkiya pore
@jainibrm1
@jainibrm1 3 жыл бұрын
ആദ്യം 6 വന്നാൽ പെട്ടന്ന് കിട്ടും 5 വന്നാലോ. മൊത്തം array search ചെയേണ്ടി വരും time complexity koodum.
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
array il number undo enn check cheyyunnath O(n) time comlexity varum. so ooro numberinum match check cheyyumbol o(n^2) varum. Ee method aanu 2 for loop ittu 1st cheythathu. Second method il set il indo enn nokan o(1) time complexity aanu. so total o(n) varullu.
@parthivk9075
@parthivk9075 3 жыл бұрын
@@BrototypeMalayalam hmm
@ummarfarooquk3514
@ummarfarooquk3514 3 жыл бұрын
Macchane idh powlikkum 😍💯
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
polichadakkanam 🔥
@jrmations7557
@jrmations7557 3 жыл бұрын
Sir ഞാൻ ഇപ്പൊൾ പ്ലസ് two aan പഠിക്കുന്നത്.njn കണക്കിൽ ഒരു ആവറേജ് സ്റ്റുഡൻ്റ് ആണ്.എനിക്ക് computer science പഠിക്കാൻ കഴിയുമോ...? ഏത് തരം കണക്കാണ് കമ്പ്യൂട്ടർ സയൻസിൽ പഠിക്കുന്നത്? കമ്പ്യൂട്ടർ സയൻസിൽ കണക്കിൻ്റെ role എന്താണ്.?
@jrmations7557
@jrmations7557 3 жыл бұрын
Coding cheyyumbol maths important aano
@jrmations7557
@jrmations7557 3 жыл бұрын
Sir,Enthanu problem solving skills enn kond udeshikkunnath..
@JohnDoe-to8vr
@JohnDoe-to8vr 11 ай бұрын
#InJavaScript function moveTargetToEnd(arr, target) { let rightPointer = arr.length-1; for (let i = 0; i
@keraleeyan
@keraleeyan 11 ай бұрын
Bro ithokke padichal job kittumo ??
@BrototypeMalayalam
@BrototypeMalayalam 11 ай бұрын
Ith veruthe padichathu kond job kitilla proper aay padich skill set cheythaal nalla joblekk keraam, for more help connect with our team
@JohnDoe-to8vr
@JohnDoe-to8vr 11 ай бұрын
@@keraleeyan serious ayi padichal kittum
@keraleeyan
@keraleeyan 11 ай бұрын
@@JohnDoe-to8vr c program enikku kurachu ariyam , enikku enthokke cheyyan pattum c coding use cheythu ??? . Projects cheythalalle job kittoo !! Atha chothiche ?? . C coding njan collagil adichittundu but covid timil aayathinal theory mathram aayirunnu !!
@sandeepkarippayil9282
@sandeepkarippayil9282 3 жыл бұрын
Length -1 cheyendallo
@albinjijo3329
@albinjijo3329 3 жыл бұрын
Video eppo varum
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
soon 🔜
@albinjijo3329
@albinjijo3329 3 жыл бұрын
@@BrototypeMalayalam inn varo, wait cheyyano
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
Innilla
@vishnuprasad8702
@vishnuprasad8702 3 жыл бұрын
Solution in javascript //--First Method--// //--Complexity O(n2)T, O(1)S--// const sameNumber = (array, target) => { for (j = array.length -1; j > 0; j--) { if(array[j] !== target) { for (i = 0; i { for (i = array.length - 1; i >=0 ; i--) { if(array[i] === target) { array.splice(i, 1) array.push(target) } } return array; } const array = [6, 1, 6, 8, 10, 4, 15, 6, 3, 9, 6]; const target = 6; console.log(sameNumber(array, target));
@BroForYou
@BroForYou 3 жыл бұрын
In Video ella Bro
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
no, next day 👍🏼
@syamilycm7247
@syamilycm7247 3 жыл бұрын
Anyone knows about the history of neural nets in computing?
@nsnizam6596
@nsnizam6596 3 жыл бұрын
ഞാനേ 100k kanditt vera ,allathe ith മുന്നോട്ട് കൊണ്ടൊവ്വൻ പറ്റില്ല..
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
എന്നാ വേഗം വാ, നീ ഒന്ന് വിചാരിച്ചാൽ 5 ദിവസം മതി 💪🏼
@nsnizam6596
@nsnizam6596 3 жыл бұрын
@@BrototypeMalayalam 👍🏻
@TOP10_cybro
@TOP10_cybro 3 жыл бұрын
Super
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
thanks
@gokulkrishna3242
@gokulkrishna3242 3 жыл бұрын
Korach delay varunundallo Video 2 divasay illa Waiting arnu
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
need to complete editing and final touches, thats why! we will be back soon 🔥
@prathyupkpk733
@prathyupkpk733 3 жыл бұрын
72k subscribers💙💚💚💙😍😍😍😍😍
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
and far more to go 🤩🤩🤩
@shahaludheenk1533
@shahaludheenk1533 3 жыл бұрын
Nginx tutorial ennn indavaa
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
within 2 weeks 🙌🏼
@sudo-mon2848
@sudo-mon2848 Жыл бұрын
function arrange_array(array , target) { let i = 0; let j = (array.length - 1); while(i
@safwankanniyath7694
@safwankanniyath7694 3 жыл бұрын
adipoli
@redstoneninja3375
@redstoneninja3375 3 жыл бұрын
Crossroads ❤
@shad016
@shad016 3 жыл бұрын
Kore kaalayallo kandittu??
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
athe, pettennu thanne varam 👍🏼
@rajaduraii8499
@rajaduraii8499 3 жыл бұрын
Hello Crossroads Team... your student Abilash (Peter) has been sending me your KZbin link daily... he ask me to comment his name in every link..🔥🔥🔥 yours Obediently with love PARTNER GUYZ
@rayyanrasheed8010
@rayyanrasheed8010 3 жыл бұрын
2:21 ashaante tactical moves 19:08 sonu cheythappol aayirunnu chirikkan othiri ullath um pinne nalla rasam ullath um 21:38 appol kittunna oru sukam undello ha oru valiya manasukamaa 21:58 patthu thalaya thani ravanan like Dillu bhai. Athinte pinnile secret obviously nikhil sir thanne alle randaludeum mentor Uff 29:25 ind ennnu sonu parangappol aaki aayirunnu puthiya pillark freedom kodukkunath koodipooyo 32:13 ashante oro tactical moves Uff
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
അതെ അതിബുദ്ധിപരമായ നീക്കങ്ങൾ 😜 ആഹ്‌ അതും ഒരു കാലം 😋 പിന്നല്ല, ഇരട്ട പെറ്റ സുഖം 😂 അത് പിന്നെ അത്രയേ ഉള്ളു 🤞🏼 പുതിയ പിള്ളേർക്ക് സ്വല്പം freedom കൊടുക്കുന്ന ഒരു modern family ആണ് നമ്മുടേത് 😎 വീണ്ടും വീണ്ടും തന്ത്രപരമായ നീക്കങ്ങൾ 😂
@rayyanrasheed8010
@rayyanrasheed8010 3 жыл бұрын
@@BrototypeMalayalam Uff
@sanalls
@sanalls 3 жыл бұрын
Time complexity: O(n) Space complexity: O(n) public class Arrange{ public static int[] arrange (int[] array, int target){ int i = 0; int j = array.length-1; while(i
@sanalls
@sanalls 3 жыл бұрын
janguage : java
@musthafakoppam
@musthafakoppam 2 жыл бұрын
Bro... Last value 6 allaathath koduthal result marunnundd..... pls check...
@adnanajju6025
@adnanajju6025 3 жыл бұрын
I got
@adnanajju6025
@adnanajju6025 3 жыл бұрын
O (n)t O (1)s
@raviganeshm9606
@raviganeshm9606 3 жыл бұрын
public class Main { public static int[] rearrangeArray(int[] arr, int num) { int i=0, j=arr.length-1; while(i < j ){ if(arr[i] == num) { if(arr[j] == num) { j-=1; } else { arr[i] += arr[j]; arr[j] = arr[i] - arr[j]; arr[i] = arr[i] - arr[j]; i++; j--; } } else { i++; } } return arr; } public static void main(String[] args) { int[] arr = {6,1,6,7,8,4,5,6}; int num = 6; int[] res = rearrangeArray(arr, num); for(int k=0; k
@raviganeshm9606
@raviganeshm9606 3 жыл бұрын
a = [6,4,6,7,8,9,4,5,6] b = 6 for i in range(len(a)): if a[i] == b: a.append(a.pop(i)) print(a) #Time complexity O(n) #Space complexity O(1)
@shaheenhyder8231
@shaheenhyder8231 3 жыл бұрын
Congragulations you are selected as the winner. Please share your mobile number and email Id for further communication
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
you can share your details to 7034395811 👍🏼
@Lofi_Night_YT
@Lofi_Night_YT 2 жыл бұрын
How did you get this code
@mrbmalayalam
@mrbmalayalam 2 жыл бұрын
//dart [not for cash prize] void main() { var s= result(); print(s); } result(){ List arr = [6,6,6,8,10,4,15,6,3,4,1]; int target=6; int j=arr.length-1; for(int i=0;i< arr.length;i++) { if(arr[j]==target) { j--; } if(arr[i]==target) { int swap=arr[j]; arr[j]=arr[i]; arr[i]=swap; j--; } if(i==j) { break; } } return arr; }
@MrAmeer27
@MrAmeer27 3 жыл бұрын
👍👍
@namithajoby4490
@namithajoby4490 3 жыл бұрын
🔥
@shawnbeans7389
@shawnbeans7389 3 жыл бұрын
ccna tutorial eduva
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
we can think about it 👍🏼
@SanjaySanjayxcode
@SanjaySanjayxcode 7 ай бұрын
Const read = require("readline-sync") userInput=read.question("enter choice") Let arr=[8,16,32,9,10,4] for(i=0;ii;j--){ if(arr[i]===parseInt(val)){ let tempval=arr[i] arr[i]=arr[j] arr[j]=tempval } } }
@uvvaishnav1998
@uvvaishnav1998 3 жыл бұрын
Entha video eedan thamasam?🤔
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
few more editing works to complete, thats why 👍🏼
@shamilussainc6456
@shamilussainc6456 3 жыл бұрын
public class ArraySample2 { public static void main(String[] args){ int[] array = new int[]{6,1,6,10,4,15,6,3,9,6}; System.out.print("Array before arrangement : "); for (int item: array) { System.out.print(item+" "); } int i=0,j=array.length-1; while (i != j){ if (array[i] == 6){ if(array[j]!=6){ int temp = array[j]; array[j] = array[i]; array[i] = temp; i++; } j--; }else { i++; } } System.out.print(" Array after arrangement : "); for (int item: array) { System.out.print(item+" "); } } } please comment your opinion about this one.
@solotravel145
@solotravel145 3 жыл бұрын
😂
@safvanp1680
@safvanp1680 2 жыл бұрын
put ( j - - ) in else block
@jainibrm1
@jainibrm1 3 жыл бұрын
👌🌹
@sankee6th
@sankee6th Жыл бұрын
bro intro bgm 1.5x ill set ann kekkann normal ullathinekaal😁
@GADESTO
@GADESTO 3 жыл бұрын
100k bayngara sambavamalle 🤩
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
pinnella! athaan ellathintem ustad 🔥
@abhishekballullayak2494
@abhishekballullayak2494 3 жыл бұрын
public class ArrayElementShift { public static int[] shiftToEnd( int[] array,int target) { int i; int j=array.length-1; int temp; for(i=0; i
@dr_strange.6165
@dr_strange.6165 3 жыл бұрын
🔥🔥🔥
@shincyraffy4762
@shincyraffy4762 3 жыл бұрын
public class array2 { public static int[] placeAtEnd(int[] arr, int val) { int temp; int i=0,j=arr.length-1; while(i
@uv1906
@uv1906 3 жыл бұрын
❤❤❤❤
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
much love 💖
@blank-xtx
@blank-xtx 11 ай бұрын
public class Sample{ public static int[] result(int[] array, int target){ int temp=0; int i=0; int j=array.length-1; while(j>=i){ if(array[i] == target && array[i] == array[j]){ j--; }else if(array[i] != target) i++; else if(array[i]==target && array[i]!=array[j]){ temp = array[j]; array[j] = array[i]; array[i] = temp; i++; j--; } } return array; } public static void main(String[] args){ int[] array = {6,1,6,8,10,4,15,6,3,9,6}; int target = 6; int[] display = result(array, target); for(int i=0;i
@BrototypeMalayalam
@BrototypeMalayalam 11 ай бұрын
Please you the telegram groups for Doubt clearing sections.
@suhailadrsseri788
@suhailadrsseri788 3 жыл бұрын
shaheen thakarkkanallo
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
avan polikkatte 🔥
@vishnu.s_
@vishnu.s_ 3 жыл бұрын
ഇന്നത്തെ pratical section പൊളിച്ചു.പക്ഷെ പാവം array അതിനെ വെച്ച് ഇങ്ങനെ ഒക്കെ ചെയ്യണോ.അവസാനത്തെ program queue ഇന്റെ insertion പോലെ ചെയാം Class sort{ public static void main (String[] ar){ int[25] a={6,1,6,8,10,4,15,6,3,9,6}; int e=6; int rear=a.length-1; for(int i=0;i
@lucifer-eo6bw
@lucifer-eo6bw 2 жыл бұрын
Broo ithu pola sambhavam pettannu pidi kittan valloom trick ondengil paranu tharo
@lucifer-eo6bw
@lucifer-eo6bw 2 жыл бұрын
Question manasilaayii paksha logic katthunilla 🤔🤔
@athul5041
@athul5041 2 жыл бұрын
@@lucifer-eo6bw Kure logic workout cheythu nokkiyal kittum. It grows in time.
@GOODIESS
@GOODIESS 3 жыл бұрын
Pever🔥🔥
@jithinp8441
@jithinp8441 3 жыл бұрын
1.25x set annnn😁
@arunkrish11
@arunkrish11 2 ай бұрын
JAVA package sameNumberAtEnd; import java.util.Arrays; public class SameNumberAtEnd { public static int[] sameNumerAtEnd(int[] array, int sameNum) { int j = array.length-1; for (int i = 0; i < j; i++ ) { if (array[j] == sameNum) { j = j - 1; } if (array[i] == sameNum) { int temp = array[j]; array[j] = sameNum; array[i] = temp; } } return array; } public static void main(String[] args) { int[] array = { 2, 6, 5, -4, 6, 8, 11, 6, 1, 6 }; int sameNum = 6; int[] result = sameNumerAtEnd(array, sameNum); System.out.print(Arrays.toString(result)); } } OUTPUT: [2, 1, 5, -4, 11, 8, 6, 6, 6, 6]
@ameen4038
@ameen4038 3 жыл бұрын
Combo😂💯
@fayiz.098
@fayiz.098 3 жыл бұрын
💪
@PriyanjithN
@PriyanjithN 10 ай бұрын
const arr = [6,1,6,8,10,4,15,6,3,9,6]; function allNumberToEnd(arr, target){ // O(n)T O(1)S let i = 0; let j = arr.length - 1; while(i < j){ if(arr[j] === target){ j--; continue; } if(arr[i] === target){ const temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; i++; j--; continue; } i++; } return arr; } console.log(allNumberToEnd(arr, 6)); // O(n)T O(1)S
@megamer3256
@megamer3256 3 жыл бұрын
i am coming
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
come on baby oh yeah 😜
@adnanajju6025
@adnanajju6025 3 жыл бұрын
I found some laaggggggg
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
namuk ready aakam 💪🏼
@bimalboby8854
@bimalboby8854 3 жыл бұрын
Second ✌️
@MohammedJaseemTp
@MohammedJaseemTp 2 жыл бұрын
# in python # time complexity: O(n) | 1 for loop # space complexity: O(1) | no extra space def arrayinterchangenumtolast(array,target): i = j = len(array)-1 for i in range(i,-1,-1): if array[i] == target: array[i],array[j] = array[j],array[i] j -= 1 array = [23,48,45,23,69,45,63,23,89,23,82,23,97,23,62,23,45,56,23,89] target = 23 arrayinterchangenumtolast(array,target) print("Array:",array) print("Target",target) print("OutPur",array)
@_dikshitm7715
@_dikshitm7715 3 жыл бұрын
2 aalum ore wave length aaa....othupokumm 😂😇
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
haha!! athaan vendath 🙌🏼
@ameenulhaseeb3899
@ameenulhaseeb3899 3 жыл бұрын
public class Main { public static int [] moveCommonElement(int [] inputArr,int target) { int j=inputArr.length-1; for(int i=0;i< inputArr.length;i++) { if(inputArr[j]==target) { j--; } if(inputArr[i]==target) { int swap=inputArr[j]; inputArr[j]=inputArr[i]; inputArr[i]=swap; j--; } if(i==j) { break; } } return inputArr; } public static void main(String args[]) { int [] inputArr = {6,8,9,6,4,6,8,7,6,8,3,6}; int target=6; int [] result=moveCommonElement(inputArr,target); for(int i=0;i
@rahula6605
@rahula6605 2 жыл бұрын
thankyou bro 🥰🥰
@robincr9533
@robincr9533 3 жыл бұрын
Changayi mare ningale kanan illa lo
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
മച്ചാനെ.. late aayalum, latesta varum 😘
@CA-bg3im
@CA-bg3im 4 ай бұрын
public class ArrayMovetoEnd { public static int[] rearrange(int[] array,int target) { int i=0, j=array.length-1; int temp; while(i
@aromalhere
@aromalhere 3 жыл бұрын
//Time complexity: O(N), //Space complexity: O(1) public class Main{ static int[] sortArray(int []array, int key) { int i = 0; int j = array.length - 1; while (i < j) { while (i < j && array[j] == key) j--; if (array[i] == key) swap(array, i, j); i++; } return array; } static int[] swap(int []arr, int i, int j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; return arr; } public static void main(String[] args) { int []arr = { 6,1,6,8,10,4,15,6,3,9,6 }; int Key = 6; int []res = sortArray(arr, Key); for(int i = 0; i < arr.length; i++) System.out.print(res[i] + " "); } } //Aromal S //aromalsanthosh@protonmail.com //+917902293783
@bibinbabu2734
@bibinbabu2734 3 жыл бұрын
I think the time complexity is 0(n^2)
@bibinbabu2734
@bibinbabu2734 3 жыл бұрын
Use OK two while loop
@BroForYou
@BroForYou 3 жыл бұрын
Anth patti Brothers kora ayalo kandit
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
ഒന്ന് rest എടുത്തതാ! പെട്ടെന്ന് തന്നെ വരും 🔥
@hishamahammmedkm1936
@hishamahammmedkm1936 3 жыл бұрын
where is the tamil Guy
@BrototypeMalayalam
@BrototypeMalayalam 3 жыл бұрын
അവന്റെ സമയം ആവുമ്പോൾ അവൻ വരും 🔥🤩
@radz115
@radz115 3 жыл бұрын
Time Complexity : O(n) Space Complexity : O(1) public class Main { public static int[] SwapToEnd(int[] Array,int target) { int j = Array.length - 1; for (int i = 0; i < Array.length; i++) { if (Array[i] == target && i < (j - 1)) { while (Array[j] == target && i < (j - 1)) { j--; } int temp = Array[j]; Array[j] = Array[i]; Array[i] = temp; } } return Array; } public static void main(String[] args) { int[] Array={6,1,6,8,10,4,15,6,3,9,6}; int target=6; System.out.print("Before : "); for(int i=0;i
@hidashsaidu8466
@hidashsaidu8466 3 жыл бұрын
First
@SidhikTanalur
@SidhikTanalur 3 жыл бұрын
var six = 6; var numbers = [6,1,6,8,10,4,15,6,3,9,6]; var new_nums = []; for (var i = 0; i < numbers.length; i++) { if (numbers[i] == six) { new_nums.push(numbers[i]); } else { new_nums.unshift(numbers[i]); } } numbers = new_nums; console.log(JSON.stringify(numbers));
@tojyjv748
@tojyjv748 3 жыл бұрын
എഴുതുന്നതെല്ലാം ചരിഞ്ഞു പോകുന്നു. വായിക്കാൻ പ്രയാസം. രണ്ടുപേരും എഴുന്നേറ്റ് നിന്ന് സംസാരിച്ചാൽ എഴുതുന്നത് നേരെ ആകും. സാധാരണ എല്ലാവരും ക്ലാസ്സ് എടുക്കുന്നത് എഴുന്നേറ്റ് നിന്നിട്ട് ആണല്ലോ.
@snehasunny6585
@snehasunny6585 2 жыл бұрын
public class Main { public static void main(String[] args) { int intArray[]={6,1,6,8,10,4,15,6,3,9,6}; int end=intArray.length-1; for(int i=0;i0){ if(intArray[i-1]==intArray[end]){ break; } } int temp = intArray[end]; intArray[end] = intArray[i]; intArray[i] = temp; } } System.out.println(Arrays.toString(intArray)); } } Time: O(n), Space O(1)
@SarinM
@SarinM 3 жыл бұрын
Hack Club member spotted
@Apxc.
@Apxc. 4 ай бұрын
import java.util.*; public class Main{ public static void main(String[] args){ int[] a={6,1,6,8,10,15,6,3,9,6}; int selectedNumber = 6; moveSelectedNumberToEnd(a, selectedNumber); System.out.println(Arrays.toString(a)); } public static void moveSelectedNumberToEnd(int[] array,int selectedNumber){ int n =array.length; int j=0; //Transing the aarr for (int i =0; i
@mohammed-rahil
@mohammed-rahil 3 жыл бұрын
❤️❤️❤️
Part6DataStructure
26:16
Brototype Malayalam
Рет қаралды 40 М.
Part11DataStructure
21:28
Brototype Malayalam
Рет қаралды 19 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Part3DataStructure
28:12
Brototype Malayalam
Рет қаралды 57 М.
Part13Data Structure
1:12:45
Brototype Malayalam
Рет қаралды 18 М.
Part12DataStructure
1:07:21
Brototype Malayalam
Рет қаралды 22 М.
Part 24 | C pattern printing | മലയാളം | S N Z Pattern
11:57
Part22DataStructure
55:31
Brototype Malayalam
Рет қаралды 14 М.
Solve Any Pattern Question With This Trick!
57:20
Kunal Kushwaha
Рет қаралды 2,5 МЛН
Negatives of BROCAMP| BROTOTYPE |REVIEW
13:14
Ananthu
Рет қаралды 76 М.
Part8DataStructure
39:50
Brototype Malayalam
Рет қаралды 17 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН