mirror of
https://github.com/TheAlgorithms/Ruby
synced 2024-12-26 21:58:56 +01:00
Update next_greater_element.rb
This commit is contained in:
parent
4d9d7ca1cd
commit
20d5ea3b6d
1 changed files with 2 additions and 2 deletions
|
@ -29,8 +29,8 @@
|
|||
|
||||
# Complexity Analysis
|
||||
#
|
||||
# Time complexity : O(m*n). The complete nums1 array (of size n) needs to be scanned for all the m elements of nums2 in the worst case.
|
||||
# Space complexity : O(1). No additional space since we're swapping elements in nums1 and returning the input array.
|
||||
# Time complexity: O(m*n). The complete nums1 array (of size n) needs to be scanned for all the m elements of nums2 in the worst case.
|
||||
# Space complexity: O(1). No additional space since we're swapping elements in nums1 and returning the input array.
|
||||
|
||||
# @param {Integer[]} nums1
|
||||
# @param {Integer[]} nums2
|
||||
|
|
Loading…
Reference in a new issue