TGViewer
Channel Public Channel
Coding Interview Preparation

Coding Interview Preparation

@coding_interview_preparation

Coding interview preparation for software engineers

Interview questions, DSA, clean solutions.
Join πŸ‘‰ https://rebrand.ly/bigdatachannels

Buy ads: https://telega.io/c/coding_interview_preparation

DMCA: @disclosure_bds
Contact: @mldatascientist
Subscribers
5.89K
Photos
490
Videos
2
Links
174

Showing posts older than #1000 Β· Back to latest

Older Posts 20 shown
Post #999 969
WHY USE STREAMLIT
  • ❀ 1
Post #998 980
Tkinter
  • ❀ 1
Post #997 1.02K
Let’s analyze the Python code snippet from the image:

python
Copy
Edit
def add_n(a, b):
return (a + b)

a = 5
b = 5

print(add_n(4, 3))
Step-by-step explanation:
A function add_n(a, b) is defined to return the sum of a and b.

The variables a = 5 and b = 5 are declared but not used inside the function call β€” they are irrelevant in this context.

The function is called with explicit arguments: add_n(4, 3), so:

python
Copy
Edit
return 4 + 3 # = 7

βœ… Correct answer: C. 7
  • ❀ 3
  • πŸ‘ 1
Post #996 904
a = "10" β†’ Variable a is assigned the string "10".

b = a β†’ Variable b also holds the string "10" (but it's not used afterward).

a = a * 2 β†’ Since a is a string, multiplying it by an integer results in string repetition.

"10" * 2 results in "1010"

print(a) β†’ prints the new value of a, which is "1010".


βœ… Correct answer: D. 1010
Post #995 931
Let's analyze the Python code step by step:

python
a = "Sun"
b = "Moon"
c = a
a = b
b = c
print(a + " and " + b)

Step-by-step breakdown:
1. `a = "Sun"` β†’ variable `a` now holds `"Sun"`.
2. `b = "Moon"` β†’ variable `b` now holds `"Moon"`.
3. `c = a` β†’ variable `c` is assigned the value of `a`, which is `"Sun"`.
4. `a = b` β†’ variable `a` is now assigned the value of `b`, which is `"Moon"`.
5. `b = c` β†’ variable `b` is now assigned the value of `c`, which is `"Sun"`.

Final values:
-a = "Moon"
-b = "Sun"`

So, the `print(a + " and " + b)` will output:


Moon and Sun

βœ… Correct answer: A. Moon and Sun
  • ❀ 2
Post #994 919
What do you think?
  • ❀ 1
  • πŸ‘ 1
Post #993 1.05K
MACHINE LEARNING
  • ❀ 1
Post #992 1.09K
  • ❀ 1
Post #991 1.13K
NUMPY CHEATSHEET
  • ❀ 1
Post #989 1.24K
INTERVIEW CHEATSHEET
  • ❀ 3
Post #988 1.1K
A DEADLOCK?
  • ❀ 1
Post #987 1.12K
DEVOPS CHEAT SHEET
  • ❀ 2
Post #986 1.15K
IMPROVING API PERFORMANCE
Post #985 1.12K
πŸ’‘Use ZIP function to iterate over multiple lists simultaneously πŸ’‘
  • ❀ 2
  • πŸ‘ 1
Post #984 1.05K
SCREENSHOTS IN PYTHON
Post #983 1.17K
Technologies used by Netflix
Post #982 1.07K
Do you know these symbols?
Post #981 1.02K
Common Coding Mistakes to Avoid
Even experienced programmers make mistakes.


Undefined variables:
Ensure all variables are declared and initialized before use.

Type coercion:
Be mindful of JavaScript's automatic type conversion, which can lead to unexpected results.

Incorrect scope:
Understand the difference between global and local scope to avoid unintended variable access.

Logical errors:
Carefully review your code for logical inconsistencies that might lead to incorrect output.

Off-by-one errors:
Pay attention to array indices and loop conditions to prevent errors in indexing and iteration.

Infinite loops:
Avoid creating loops that never terminate due to incorrect conditions or missing exit points.

Example:
// Undefined variable error
let result = x + 5; // Assuming x is not declared

// Type coercion error
let age = "30";
let isAdult = age >= 18; // Age will be converted to a number

By being aware of these common pitfalls, you can write more robust and error-free code.

Do you have any specific coding mistakes you've encountered recently?
Post #980 825
Getting job offers as a developer involves several steps:πŸ‘¨β€πŸ’»πŸš€

1. Build a Strong Portfolio: Create a portfolio of projects that showcase your skills. Include personal projects, open-source contributions, or freelance work. This demonstrates your abilities to potential employers.πŸ‘¨β€πŸ’»

2. Enhance Your Skills: Stay updated with the latest technologies and trends in your field. Consider taking online courses, attending workshops, or earning certifications to bolster your skills.πŸš€

3. Network: Attend industry events, conferences, and meetups to connect with professionals in your field. Utilize social media platforms like LinkedIn to build a professional network.πŸ”₯

4. Resume and Cover Letter: Craft a tailored resume and cover letter for each job application. Highlight relevant skills and experiences that match the job requirements.πŸ“‡

5. Job Search Platforms: Utilize job search websites like LinkedIn, Indeed, Glassdoor, and specialized platforms like Stack Overflow Jobs, GitHub Jobs, or AngelList for tech-related positions. πŸ”

6. Company Research: Research companies you're interested in working for. Customize your application to show your genuine interest in their mission and values.πŸ•΅οΈβ€β™‚οΈ

7. Prepare for Interviews: Be ready for technical interviews. Practice coding challenges, algorithms, and data structures. Also, be prepared to discuss your past projects and problem-solving skills.πŸ“

8. Soft Skills: Develop your soft skills like communication, teamwork, and problem-solving. Employers often look for candidates who can work well in a team and communicate effectively.πŸ’»

9. Internships and Freelancing: Consider internships or freelancing opportunities to gain practical experience and build your resume. 🏠

10. Personal Branding: Maintain an online presence by sharing your work, insights, and thoughts on platforms like GitHub, personal blogs, or social media. This can help you get noticed by potential employers.πŸ‘¦

11. Referrals: Reach out to your network and ask for referrals from people you know in the industry. Employee referrals are often highly valued by companies.🌈

12. Persistence: The job search process can be challenging. Don't get discouraged by rejections. Keep applying, learning, and improving your skills.πŸ’―

13. Negotiate Offers: When you receive job offers, negotiate your salary and benefits. Research industry standards and be prepared to discuss your expectations.πŸ“‰

Remember that the job search process can take time, so patience is key. By focusing on these steps and continuously improving your skills and network, you can increase your chances of receiving job offers as a developer.
  • ❀ 1
Post #979 974
100+ Practice Questions

❍ C/C++
❍ Python
❍ JavaScript
❍ Java
❍ C#
❍ Golang

➊ Simple Numbers

βž€ Find a digit at a specific place in a number
➁ Find count of digits in a number
βž‚ Find the largest digit
βžƒ Find the 2nd largest digit
βž„ Find the kth largest digit
βž… Find the smallest digit
βž† Find the 2nd smallest digit
βž‡ Find the kth smallest digit
➈ Find generic root (sum of all digits) of a number
βž‰ Reverse the digits in a number
βž€βž€ Rotate the digits in a number
βž€βž Is the number a palindrome?
βž€βž‚ Find sum of 'n' numbers
βž€βžƒ Check if a number is perfect square
βž€βž„ Find a number in an AP sequence
βž€βž… Find a number in a GP sequence
βž€βž† Find a number in fibonacci sequence
βž€βž‡ Check number divisibility by 2, 3, 5, 9
βž€βžˆ Check if a number is primary or not
20. Given a number, print all primes smaller than it
βžβž€ Check if a number is circular prime or not
➁➁ Find all prime factors of a number
βžβž‚ Find the GCD of 2 numbers
βžβžƒ Find the LCM of 2 numbers
βžβž„ Find the factorial of a number
βžβž… Find the exponentiation of a number

βž‹ Unit Conversion

βž€ Number Base (Binary, Octal, Hexadecimal, Decimal)
➁ Weight (gram, kg, pound)
βž‚ Height (cm, m, inch, feet)
βžƒ Temperature (centigrade, fahrenhite)
βž„ Distance (km, mile)
βž… Area (mΒ², kmΒ², acre)
βž† Volume (ltr, gallon)
βž‡ Time (sec, min, hour)
➈ Currency

➌ Calculator

βž€ Loan EMI Calculator
➁ Fixed Deposit Returns Calculator
βž‚ Interest Calculator
βžƒ BMI Calculator
βž„ Item Price (considering tax, discount, shipping)
βž… Tip Calculator

➍ Geometry

βž€ Find distance between 2 points
➁ Given 2 sides of a right angle triangle, find the 3rd
βž‚ Find 3rd angle of a triangle when 2 are given
βžƒ Area of a triangle when 3 sides are given
βž„ Area of a right angle triangle
βž… Perimeter of a Square
βž† Area of a Square
βž‡ Perimeter of a Rectangle
➈ Area of a Rectangle
βž‰ Circumference of a Circle
βž€βž€ Area of a Circle
βž€βž Circumference of a Semi-Circle
βž€βž‚ Area of a Semi-Circle
βž€βžƒ Area of a Ring
βž€βž„ Circumference of an Ellipse
βž€βž… Area of an Ellipse
βž€βž† Suface Area of a Sphere
βž€βž‡ Volume of a Sphere
βž€βžˆ Surface Area of a Hemisphere
20. Volume of a Hemisphere
βžβž€ Surface area of a Cube
➁➁ Volume of a Cube
βžβž‚ Surface area of a Cylinder
βžβžƒ Volume of a Cylinder

➎ Vector

βž€ Find Scalar Multiplication of a vector
➁ Find addition/subtraction of vectors
βž‚ Find magnitude of a vector
βžƒ Find an unit vector along a given vector
βž„ Find dot product of 2 vectors
βž… Find cross product of 2 vectors
βž† Check if 2 vectors are orthogonal

➏ Matrix

βž€ Find the determinant of a matrix
➁ Find Scalar Multiplication of a matrix
βž‚ Find addition/subtraction of matrices
βžƒ Find the transpose of a matrix
βž„ Find if 2 matrices are orthogonal
βž… Find inverse of a 2x2 and 3x3 matrix

➐ Set

βž€ Find Union of 2 sets
➁ Find Intersection of 2 sets
βž‚ Find the Difference of 2 sets
βžƒ Find the Symmetric Difference of 2 sets
βž„ Find if a set is subset/superset of another set
βž… Find if 2 sets are disjoints

βž‘ Special Numbers

βž€ Strong Number
➁ Perfect Number
βž‚ Armstrong Number
βžƒ Harshad Number
βž„ Kaprekar Number
βž… Lychrel Number
βž† Narcissistic Decimal Number
βž‡ Lucus Number
➈ Catalan Number
βž‰ Duck Number
βž€βž€ Ugly Number
βž€βž Abundant Number
βž€βž‚ Deficient Number
βž€βžƒ Automorphic Number
βž€βž„ Magic Number
βž€βž… Friendly Pair Numbers
βž€βž† Neon Number
βž€βž‡ Spy Number
βž€βžˆ Happy Number
20. Sunny Number
βžβž€ Disarium Number
➁➁ Pronic Number
βžβž‚ Trimorphic Number
βžβžƒ Evil Number
βžβž„ Amicable Pairs
  • ❀ 2
Older posts β†’
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’