Skip to content

Instantly share code, notes, and snippets.

View RakhmedovRS's full-sized avatar
👀
Watching you

Ruslan Rakhmedov RakhmedovRS

👀
Watching you
View GitHub Profile
● implemented configurable mock APIs for crucial systems
● designed and implemented authentication micro-services using JAX-RS and Spring RESTful ● designed a micro-service to streamline integration testing for 3rd party developers
● reduced the average lock time of critical SQL queries by 70% by re-writing stored procedures and re-designing DB relationships
● reduced UI regression testing time by 40% by designing a specialized system
● reduced manual testing by 40% by embedding my solution into a pipeline
● designed and implemented a core module for the auto-testing system which uses the latest Spring technologies
Technologies: Java, Spring, Oracle DB, SQL, PL\SQL, JAX-RS, Karate, JMS, Microservices
● designed and implemented an automated module that saves up to 750 man-hours in any bank it is installed. The module was used by 6 large banks
● improved performance of crucial SQL queries 2-6 times
● improved performance of loading application by 40%
● created a fraud searching system that is easier to maintain and easier to work with than with the previous one
● introduced a new version control system and auxiliary system to update source code on schedule
Technologies: SQL, PL\SQL, Oracle DB, RSL
public boolean isValidBST(TreeNode root)
{
Integer[] prev = new Integer[1];
return isValidBST(root, prev);
}
public boolean isValidBST(TreeNode root, Integer[] prev)
{
boolean left = true;
if (root.left != null)
public int[] topKFrequent(int[] nums, int k) {
Map<Integer, Integer> valueToCount = new HashMap<>();
int max = 0;
for (int num : nums) {
int count = valueToCount.getOrDefault(num, 0) + 1;
valueToCount.put(num, count);
max = Math.max(max, count);
}
System.out.println(valueToCount);
int pos = max;
int[] answer = new int[k];
int i = 0;
while (pos >= 0) {
for (int value : buckets.get(pos)) {
answer[i++] = value;
if (i == k) {
return answer;
}
}
for (Map.Entry<Integer, Integer> entry : valueToCount.entrySet()) {
buckets.get(entry.getValue()).add(entry.getKey());
}
List<List<Integer>> buckets = new ArrayList<>();
for (int i = 0; i <= max; i++) {
buckets.add(new ArrayList<>());
}
Map<Integer, Integer> valueToCount = new HashMap<>();
int max = 0;
for (int num : nums) {
int count = valueToCount.getOrDefault(num, 0) + 1;
valueToCount.put(num, count);
max = Math.max(max, count);
}
public int[] topKFrequent(int[] nums, int k) {
Map<Integer, Integer> valueToCount = new HashMap<>();
for (int num : nums) {
int count = valueToCount.getOrDefault(num, 0) + 1;
valueToCount.put(num, count);
}
int pos = 0;
int[] answer = new int[k];
PriorityQueue<Integer> pq = new PriorityQueue<>((a,b) ->
int pos = 0;
int[] answer = new int[k];
PriorityQueue<Integer> pq = new PriorityQueue<>((a,b) ->
valueToCount.get(b) - valueToCount.get(a));
pq.addAll(valueToCount.keySet());
while (k-- > 0)
{
answer[pos++] = pq.remove();
}