LeetCode-Solutions icon indicating copy to clipboard operation
LeetCode-Solutions copied to clipboard

1920. Build Array from Permutation

Open KOMALDEWNANI opened this issue 3 years ago • 1 comments

Pull Request Template

Description

Given a zero-based permutation nums (0-indexed), build an array ans of the same length where ans[i] = nums[nums[i]] for each 0 <= i < nums.length and return it.

A zero-based permutation nums is an array of distinct integers from 0 to nums.length - 1 (inclusive). No dependencies required.

Put check marks:

Have you made changes in README file ?

  • [x] Added problem & solution under correct topic.
  • [x] Specified Space & Time complexity.
  • [x] Specified difficulty level, tag & Note(if any).

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • [ ] Test A
  • [ ] Test B

Make sure all below guidelines are followed else PR will get Reject:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code so that it is easy to understand
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published in downstream modules

KOMALDEWNANI avatar Oct 23 '21 21:10 KOMALDEWNANI

I can tell this is your first pull request! Thank you I'm so honored. :tada::tada::tada: I'll take a look at it ASAP!

welcome[bot] avatar Oct 23 '21 21:10 welcome[bot]