Порридж В Ко-ливинге
Viktor
How he found that chat?!
ну где-то в гугле очевидно
Viktor
Так что это за Score? :)
я забыл как он рассчитывается, я честно украл этот список, ну а-ля это какой-то взвешенный показатель сложности
Viktor
сколько людей решают, скольким нравится и т.д.
Evgeniy
Т.е. ювелирная задача самая простая получается
Viktor
Пришлось скрыть этот пост. Просто адский ад, не посмотрел сколько участников в этой группе 😄
Uladzimir
Так в чем смысл этой таблички? Прорешаешь все и будешь молодцом?)
Viktor
Так в чем смысл этой таблички? Прорешаешь все и будешь молодцом?)
Ну типа какая-то точка отсчета если не знаешь за что браться. Есть табличка по которой решать.
Viktor
50 answers!
В личке там просто ад.
Uladzimir
Ааа, круто че
Evgeniy
А я на литкоде просто сортирую по процентам решённых
Evgeniy
или сложность фильтрую
Viktor
Сомневаюсь.
Evgeniy
1445 на литкоде, 1444 тут
Evgeniy
Он или новый, или всё же обновляется
Viktor
Воу, не посмотрел весь список. Ну значит ещё лучше!
Evgeniy
Сегодняшнюю задачу, кстати, решил?
Evgeniy
Я неделю назад уже делал
Порридж В Ко-ливинге
Порридж В Ко-ливинге
Я лучше чем 3 переменные 1 while и 2 if не решил(
Evgeniy
https://leetcode.com/problems/odd-even-linked-list/discuss/623022/C-O(n)-iterative-and-recursive-solution
New
Hello
Evgeniy
Порридж В Ко-ливинге
Yo
New
Can anyone explain how this is working ?
Порридж В Ко-ливинге
Hello
Where are u from btw?
Порридж В Ко-ливинге
Good
Порридж В Ко-ливинге
Can anyone explain how this is working ?
It's called object distruction
New
What if we have another object with property min and max with different value how to access that specific object
Порридж В Ко-ливинге
C++?
There "const" word, it's only JS
Порридж В Ко-ливинге
?
Do you know what is arrow function
Порридж В Ко-ливинге
Arrow
New
Es6 update
Evgeniy
Порридж В Ко-ливинге
New
We are passing parameters min and max without specifying object name how this is possible
Viktor
I'm glad that @Glazomer47 used to live in Australia and speaks perfect English, as well as JavaScript, he'll explain how destructuring works 🙂
Порридж В Ко-ливинге
const half ({max, min}) => (max + min) / 2.0 Is the same as const half (temp) => { var max = temp.max, min = temp.min; return (max + min) / 2.0; }
Evgeniy
Is {min, max} an anonymous object in that case?
Viktor
It's just the same if I wrote it like that: const half = (v) => (v.max + v.min) / 2.0
Порридж В Ко-ливинге
What if we have another object with property min and max with different value how to access that specific object
It best described, if you ll read about "object destructing ES6", they have small article with examples
Порридж В Ко-ливинге
Is {min, max} an anonymous object in that case?
No, we "taking out" properties like they are variables
Viktor
btw, destructuring works with structs in c++, which makes a ton of sense about its name
Порридж В Ко-ливинге
Viktor
New
How can i do it
New
I want to perform on anotherObject
Viktor
Just try it out. You may pass any object there, the name doesn't matter, as long as it has those properties it'll work out.
Порридж В Ко-ливинге
Порридж В Ко-ливинге
It take ANY object
Порридж В Ко-ливинге
And get it properties
Порридж В Ко-ливинге
How can i do it
You just pass it to this function
New
It take ANY object
If multiple objects have same property what then ?
Evgeniy
But what about two different objects with same names of two properties? For example: obj = { one: '123', two : '456'} and obj2 = { one: 'vasya', two: 'pupkin' }. This break our code, isn't it?
Порридж В Ко-ливинге
Порридж В Ко-ливинге
It's function
Порридж В Ко-ливинге
It does not know what object you are passing
Порридж В Ко-ливинге
Like
New
Can you write code for such situations
Порридж В Ко-ливинге
Look
Порридж В Ко-ливинге
const function1 = (object) => object.max const obj1 = {max: 5}, obj2 = {max: 7} function1(obj1) == 5 function2(obj2) == 7