How to make class immutable
Iterative merge sort
Given rules of below kind of format
Where e(i) is an expression. ( Not necessary to be defined for the problem). There can be n number of rules. The rules can get complex.. the question is how do you store these rules( what data structure/ class structure) so that if there are 10 rules out of n to be applied on some parameter, you need to print what is the result of each rule. Main question is how to store these rules.
R1= e1&(e2|e3)& e4|(e1&e2)
Interviewer have the hint to store them in forest with expressions as nodes and rule id as edge. Live below .
First expand it as (e2&e1)|(e3&e1). Store as below forest..
Clone linked list with each node having random pointers sorry from next . Without any extra space
- MakeMyTrip Interview Experience | Set 14 (For Senior Android developer)
- MakeMyTrip Interview for Senior Software Engg.
- Arcesium Interview Experience - Senior Software Engineer (3 years experience)
- BrowserStack Interview Experience - Senior Software Engineer
- PayU Interview Experience - Senior Software Engineer
- Myntra Interview Experience | Set 4 (For Senior Software Engineer )
- FreeCharge Interview Experience for Senior Software Engineer
- CloudElements Senior Software Engineer Interview Experience
- Interview Experience with Yatra(Hyderabad) | Set 3 (For Senior Software Engineer)
- Progress Company Interview Experience | Set 1 (Senior Software Engineer)
- Lynk Logistics Interview Experience | Senior Software Engineer
- Stryker Interview Experience | Senior Software Engineer - Gurugram
- Microsoft Interview Experience | Senior Software Engineer (4 Years Experienced)
- Myntra Interview Experience | 5years Experienced for Senior Software Engineer
- Quikr India Interview Experience (Full Stack Developer)(Senior Software Engineer)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.