SV questions for interviews - any additional answers are appreciated

Hi,

I have 1.5 years of experience in SV, constraints, and trying to solve the below questions I have collected to practice SV coding for my interview prep.
Anyone open to try these along with me and post alternate answers can give it a try so we can share different methods.
Any help or share is much appreciated.

  1. Randomly generate square matrix (NxN) of integers; N dimension should be a random odd number.
  2. Elements within a row should be unique. Rotate this array by 90 degree
  3. Write a constraint to generate 4 variables that are unique (with and without using unique)
  4. Generate two arrays of length 10, whose elements are unique to each? Later he explained that all the 20 elements in both the arrays should be unique

Didn’t see any sites like leetcode to practice SV coding. If I’m missing any info, kindly share with me any resources that could be useful.
Thanks in advance.

In reply to sk7799:

Some questions (or very similar) you have listed have been asked several times in this forum you can use the search feature to find the proposed solutions

i.e square matrix of size odd number and no duplicate max element in rows. | Verification Academy

https://verificationacademy.com/forums/systemverilog/systemverilog-constraint-populate-unique-values-2d-fixed-size-array-without-using-unique-keyword

Regarding practicing you could try using https://www.edaplayground.com/

HTH,

-R