+ 19

🏆🏆[Challenge] Write a program to write code🏆🏆

Write a program which can minimize the duplicates value of an array.. You have to minimize code not array .. For example... Input : a=['a67', 'b68', 'j24', 'k25', 'a67', 'b68' ,'a67', 'b68', 'j24', 'k25', 'a67', 'b68']; output : needs to return a[0],a[4],a[6],a[10]=a67 a[1],a[5],a[7],a[11]=b68 a[2],a[8]=j24 a[3],a[9]=k25

26th Oct 2017, 12:47 PM
Nikky Amresh
Nikky Amresh - avatar
42 Antworten
+ 13
Thanks for the challenge. Here's my try : https://code.sololearn.com/c0ebT2xUiasF/?ref=app
26th Oct 2017, 10:52 PM
LukArToDo
LukArToDo - avatar
+ 9
https://code.sololearn.com/cowQKT92ux8z/?ref=app Here's my answer 😊
27th Oct 2017, 7:30 AM
PandaPanda🐼
PandaPanda🐼 - avatar
+ 6
@Harshit Yes, I'm a beta tester
26th Oct 2017, 2:11 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 6
@Shivani I wanted to ask how to add code to lesson we are suggesting to the lesson factory in beta version of sololearn.
26th Oct 2017, 4:13 PM
Akash Pal
Akash Pal - avatar
+ 6
@Akash Highlight your code by selecting it, then the options given below will get enabled
26th Oct 2017, 4:23 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 6
@Akash Don't you know how to select text?
26th Oct 2017, 4:28 PM
Kartikey Sahu
Kartikey Sahu - avatar
26th Oct 2017, 1:41 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 5
I don't understand it
26th Oct 2017, 1:48 PM
Fire Feathers
Fire Feathers - avatar
+ 5
@Kartikey If you are a beta tester. Can I ask you how to add code when we are writing a lesson in lesson factory. The Option given below are not working. How can I add code and notes? Please tell me.
26th Oct 2017, 2:20 PM
Akash Pal
Akash Pal - avatar
+ 4
hello)))
26th Oct 2017, 1:00 PM
Георгий Оленченко
Георгий Оленченко - avatar
26th Oct 2017, 1:06 PM
Dove
Dove - avatar
+ 4
@Harshit 😂😂
26th Oct 2017, 1:49 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 4
@Kartikeya some hint pls
26th Oct 2017, 2:00 PM
Fire Feathers
Fire Feathers - avatar
+ 4
are you in the beta program
26th Oct 2017, 2:02 PM
Fire Feathers
Fire Feathers - avatar
+ 4
I got invited but update has not arrived yet
26th Oct 2017, 2:02 PM
Fire Feathers
Fire Feathers - avatar
+ 4
@Harshit If the array contains [1, 2, 1, 2, 3] Do a loop that reads every element Do a second loop inside first one to check if there is any duplicate value and store it into any temporary array which prints all its values when an iteration of first ends and gets empty when new iteration of first loop start. Don't forget to do something that checks whether you have already printed the index of value
26th Oct 2017, 2:08 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 3
nikky
26th Oct 2017, 1:00 PM
Георгий Оленченко
Георгий Оленченко - avatar
+ 3
well I am a slow learner don't mind
26th Oct 2017, 1:49 PM
Fire Feathers
Fire Feathers - avatar
+ 3
Plz can you explain me it in more
26th Oct 2017, 1:53 PM
Sayantan Sinharay
Sayantan Sinharay - avatar
+ 3
can I be given just a hint with c++
26th Oct 2017, 1:53 PM
Fire Feathers
Fire Feathers - avatar