Introduction:

2、Lowes India Hiring Codeathon
Your home to possibilities ♂
? 2024 Lowe’s. All rights reserved. Lowe’s and the gable mansard design are registered trademarks of LF, LLC. Lowe’s is an equal opportunity employer and administers all personnel practices without regard to race, color, religious creed, sex, gender, age, ancestry, national origin, mental or physical disability or medical condition, sexual orientation, gender identity or expression, marital status, military or veteran status, genetic information, or any other category protected under federal, state, or local law. For individuals with disabilities who would like to request an accommodation, email .
Lowes India Hiring Codeathon ♂
Any guys who cleared the first round of Lowes India Hiring challenge on Hacker earth Please Help me with these coding questions .
Question 1) (Based on Graphs)
1)We are given an undirected graph with no edge weights and each node is numbered from 1 to n .Each node contains a value which will be given as a separate array with 1-based indexing. There are two players and they play with this graph using following rules:
1)Player1 selects one node and removes that node including the edges connected to it in order to break it into two or more parts.
2)Now ,Player2 now selects the connected component of the graph such that the sum of all values in the nodes of selected component is maximum.
3)Now, Player1 selects the connected component from the remaining connected components .
Scores of each player is the sum of values at all nodes of the connected component of graph which was selected by them and each player wants to maximize his/her score .Assume each player optimally.
we need to output the scores of player1 and player2.
Question 2) (Based on Trees)
In this question we are given a binary tree in which some nodes are colored in white and some nodes in black color.We can color the given tree by following the below rules:
1)We can color only white nodes means only the white nodes from the given tree can be converted in to black nodes. Reverse in not possible.
2)We can color any white node in to black node if and only if the parent of white node is a black node.
Using above mentioned rules we have to find the number of different possible trees which can be obtained by coloring the given tree using the above rules.
Related questions
Hiring a hacker is illegal if the purpose is to gain unauthorized access to systems, data, or networks, or to engage in any form of cybercrime. Here’s a detailed breakdown:
Key Legal Considerations:
Unauthorized Access:
- Laws like the U.S. Computer Fraud and Abuse Act (CFAA), the UK’s Computer Misuse Act, and the EU’s Directive on Attacks Against Information Systems criminalize unauthorized access to computers or networks. Hiring someone to hack without explicit permission violates these laws.
Conspiracy and Accomplice Liability:
- Even if you don’t perform the hack yourself, conspiring to commit cybercrime (e.g., paying a hacker to steal data) can lead to charges like conspiracy, aiding, or abetting. Penalties may include fines, imprisonment, or both.
Ethical Hacking vs. Malicious Hacking:
- Legal: Hiring a certified ethical hacker (e.g., penetration testers) with written authorization from the system owner is lawful. These professionals help identify security flaws.
- Illegal: Hiring a "black-hat" hacker for malicious purposes (e.g., stealing data, deploying ransomware, or disrupting services) is a crime.
Jurisdiction:
- Cybercrime laws vary globally, but most countries criminalize unauthorized hacking. International cooperation (e.g., via treaties like the Budapest Convention) enables cross-border prosecution.
Civil Liability:
- Victims of hacking can sue for damages (e.g., data breaches, financial losses). Both the hacker and the person hiring them may face lawsuits.
Consequences:
- Criminal Penalties: Fines, imprisonment (e.g., up to 10+ years under the CFAA for severe cases).
- Reputational Damage: Loss of trust, business opportunities, or employment.
- Civil Lawsuits: Financial restitution to affected parties.
Key Takeaway:
Hiring a hacker is illegal unless explicitly authorized (e.g., ethical hacking with permission). Always ensure compliance with cybersecurity laws and work with certified professionals for legitimate security testing. If in doubt, consult a legal expert.

评论已关闭