Wednesday, February 28, 2024
How to prepare a good presentation
Saturday, November 4, 2023
AI: Detecting phone number and email in messages
Thursday, April 13, 2023
Adventures with chatGPT
#include <stdio.h>int main() {for (unsigned long long i = 0; i < 5; i++) {unsigned long long a = i;printf("i = %u, a = %llu\n", i, a);}getchar();return 0;}
Thursday, March 23, 2023
Why are your grades important?
Below is the formula used by TÜBİTAK to rank and filter job applicants before an interview:
If the score that comes out of this equation is less than 3.2, you will not even be considered.The effect of CGPA on the score is constant and direct. A one-unit increase in CGPA results in an exact one-unit increase in the score, regardless of the value of x. Mathematically:
The effect of x (exam rank) on the score is non-linear, negative, and diminishes rapidly as x increases. Mathematically:This means the score is highly sensitive to small changes in x when x is small (e.g., x=100), but becomes insensitive to changes in x when x is large. As your exam rank increases, CGPA becomes more important to differentiate you from others with similar exam ranks.Here are the plots for two different regions, x = 100...1000 and x = 1000...50000:
If your score is above 3.2, you are added to the the ranking list. For example, if five people are to be hired, typically the top 4×5 = 20 applicants (ranked by their scores) are selected for interviews. If, let's say, your score is 3.3 but there are more than 20 people with higher scores, you will still not be called for an interview.
If you make it to the shortlist, you move on to the interview stage, where your engineering, past projects and communication skills become more important than your CGPA. But to get the opportunity to demonstrate your skills, you need good grades.
To maximize your chances of getting job interviews, keep your CGPA high. If you exam rank is more than 20000, aim for a CGPA above 3.5. A minor/major in another field is not worth the effort. Do extra projects only after you have a very high CGPA.
27.10.2025: In the latest interview batch, 30 recent graduates were invited for 6 engineering positions. They were ranked according to the formula above, and the lowest score (the 30th candidate) was 4.2. A student with a CGPA of 3.7 and an exam rank of 40K had a score of 10K/40K + 3.7 = 3.95 and was not invited to the interview, since his score was less than 4.2. In this case, only a CGPA close to 4.0 would have placed him on the list.
Wednesday, December 28, 2022
Using scanf to get user input from console
In C, you can use scanf to get character input from console. However, if you do it multiple times, you will realize that pressing enter after the first scanf affects the next scanf call. This happens when you have a space after your prompt, e.g. printf("Choice: "); char c; scanf("%c"). Either don't put a space at the end of printf or use a space in scanf like so: scanf(" %c")
Friday, September 16, 2022
When is inheritance useful?
A major disadvantage of inheritance is not being able to follow the program flow by ctrl + clicking function calls due to some functionality being implemented in ancestor classes. Therefore, I prefer composition over inheritance whenever possible. The one case where inheritance shines is reusing workflows. Let's say all your child classes have a run() method that calls f1(), f2() and f2() in order, where f1, f2, f3 functions are implemented in child classes. If we move the run() method to the ancestor class, child classes would just call that run method, saving you from duplicating the f1, f2, f3 calls in each child.
Monday, September 5, 2022
Studying Algorithms and Data Structures Effectively
ARRAYS & HASHING
| 01 | Easy | Contains Duplicate |
| 02 | Easy | Valid Anagram |
| 03 | Easy | Two Sum |
| 04 | Medium | Group Anagrams |
| 05 | Medium | Top K Frequent Elements |
| 06 | Medium | Valid Sudoku |
| 07 | Medium | Product of Array Except Self |
| 08 | Medium | Longest Consecutive Sequence |
TWO POINTERS
| 09 | Easy | Valid Palindrome |
| 10 | Medium | Two Sum II Input Array Is Sorted |
| 11 | Medium | 3Sum |
| 12 | Medium | Container With Most Water |
SLIDING WINDOW
| 13 | Easy | Best Time to Buy And Sell Stock |
| 14 | Medium | Longest Substring Without Repeating Characters |
| 15 | Medium | Longest Repeating Character Replacement |
STACK
| 16 | Easy | Valid Parentheses |
| 17 | Medium | Min Stack |
| 18 | Medium | Daily Temperatures |
BINARY SEARCH
| 19 | Easy | Binary Search |
| 20 | Medium | Find Minimum In Rotated Sorted Array |
| 21 | Medium | Search In Rotated Sorted Array |
LINKED LIST
| 22 | Easy | Reverse Linked List |
| 23 | Easy | Merge Two Sorted Lists |
| 24 | Medium | Reorder List |
| 25 | Medium | Remove Nth Node From End of List |
| 26 | Easy | Linked List Cycle |
| 27 | Medium | LRU Cache |
TREES
| 28 | Easy | Invert Binary Tree |
| 29 | Easy | Maximum Depth of Binary Tree |
| 30 | Easy | Diameter of Binary Tree |
| 31 | Easy | Balanced Binary Tree |
| 32 | Easy | Same Tree |
| 33 | Easy | Subtree of Another Tree |
| 34 | Medium | Lowest Common Ancestor of a Binary Search Tree |
| 35 | Medium | Binary Tree Level Order Traversal |
| 36 | Medium | Binary Tree Right Side View |
| 37 | Medium | Count Good Nodes In Binary Tree |
| 38 | Medium | Validate Binary Search Tree |
| 39 | Medium | Kth Smallest Element In a Bst |
HEAP / PRIORITY QUEUE
| 40 | Easy | Kth Largest Element In a Stream |
| 41 | Easy | Last Stone Weight |
| 42 | Medium | Kth Largest Element In An Array |
GRAPHS
| 43 | Medium | Number of Islands |
| 44 | Medium | Max Area of Island |
| 45 | Medium | Clone Graph |
| 46 | Medium | Pacific Atlantic Water Flow |
| 47 | Medium | Surrounded Regions |
| 48 | Medium | Course Schedule |
| 49 | Medium | Course Schedule II |
29.10.2025: leetcode-75