Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
107 views

Propagation in grid

Can I do it with a lower Big O / better code? How can I improve this solution? Task: Let's assume we have a array like this: 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 ...
Egnever's user avatar
  • 29
2 votes
3 answers
2k views

Given a sorted array nums, remove the duplicates in-place

I wrote an algorithm to solve this challenge but would love some feedback on its efficiency and, if you were an interviewer, what your opinion would be on my solution. I believe my time complexity is \...
DCS's user avatar
  • 375
2 votes
1 answer
194 views

Let us schedule a meeting

Description: Write a method mergeMeetings() that takes a list of multiple meeting time ranges and returns a list of condensed ranges. The integers represent the number of 30-minute blocks past 9:00am....
CodeYogi's user avatar
  • 5,127
3 votes
1 answer
210 views

Reverse singly linked list

Description: Given a linked list reverse it and return the new head. Code: ...
CodeYogi's user avatar
  • 5,127
0 votes
3 answers
2k views

Move last node of the linked list to the front

Description: Given a linked list move the last node to the front. For example: 10 20 30 40 -> 40 10 20 30 Code: ...
CodeYogi's user avatar
  • 5,127
3 votes
1 answer
674 views

Check if two strings are permutations of each other

Description: Given two strings check if those two are permutation of each other. Its expected that input string can contain ASCII characters. Code: ...
CodeYogi's user avatar
  • 5,127
0 votes
1 answer
176 views

Pascal Triangle c# code space complexity

can you give me your impression of my implementation of Pascal triangle problem? I'm especially interested in space complexity evaluation thank you all! ...
Luke's user avatar
  • 3
7 votes
3 answers
8k views

Find K biggest numbers in the array

I was trying to implement method number 2, from this article. Method 2 (Use temporary array) K largest elements from arr[0..n-1] Store the first k elements in a temporary array temp[0..k-1]....
Gilad's user avatar
  • 5,253
4 votes
2 answers
7k views

Insert node in sorted doubly linked list

Description: Given a reference to the head of a doubly-linked list and an integer, create a new Node object having data value and insert it into a sorted linked list. Code: ...
CodeYogi's user avatar
  • 5,127